1
0
Fork 0
mirror of https://github.com/tailix/libkernaux.git synced 2024-11-13 11:04:27 -05:00
libkernaux/common/cmdline.yml

241 lines
5.8 KiB
YAML

# TODO: move here test cases from tests/test_cmdline.c
- cmdline: ''
result: []
- cmdline: ' '
result: []
- cmdline: 'foo'
result: ['foo']
- cmdline: 'foo bar'
result: ['foo', 'bar']
- cmdline: 'foo bar '
result: ['foo', 'bar']
- cmdline: ' foo bar '
result: ['foo', 'bar']
- cmdline: 'foo bar'
result: ['foo', 'bar']
- cmdline: ' foo bar'
result: ['foo', 'bar']
- cmdline: 'foo bar '
result: ['foo', 'bar']
- cmdline: ' foo bar '
result: ['foo', 'bar']
- cmdline: 'foo bar car'
result: ['foo', 'bar', 'car']
- cmdline: '\"\"'
result: ['']
- cmdline: '\"\" \"\"'
result: ['', '']
- cmdline: '\"\" \"\" \"\"'
result: ['', '', '']
- cmdline: '\"foo\"'
result: ['foo']
- cmdline: '\"foo\" \"bar\"'
result: ['foo', 'bar']
- cmdline: ' \"foo\" \"bar\"'
result: ['foo', 'bar']
- cmdline: '\"foo\" \"bar\" '
result: ['foo', 'bar']
- cmdline: ' \"foo\" \"bar\" '
result: ['foo', 'bar']
- cmdline: '\"foo\" \"bar\"'
result: ['foo', 'bar']
- cmdline: '\"foo\" \"bar\" '
result: ['foo', 'bar']
- cmdline: ' \"foo\" \"bar\"'
result: ['foo', 'bar']
- cmdline: ' \"foo\" \"bar\" '
result: ['foo', 'bar']
- cmdline: '\"foo\" \"bar\" \"car\"'
result: ['foo', 'bar', 'car']
- cmdline: 'foo bar car'
arg_count_max: 3
result: ['foo', 'bar', 'car']
- cmdline: 'foo bar car'
buffer_size: 12
result: ['foo', 'bar', 'car']
- cmdline: 'foo bar car'
arg_count_max: 3
buffer_size: 12
result: ['foo', 'bar', 'car']
- cmdline: 'foo bar car'
arg_count_max: 2
error: 'too many args'
- cmdline: 'foo bar car'
buffer_size: 11
error: 'EOF or buffer overflow'
- cmdline: 'foo bar car'
arg_count_max: 2
buffer_size: 11
error: 'too many args'
- cmdline: '\"foo\" \"bar\" \"car\"'
arg_count_max: 3
result: ['foo', 'bar', 'car']
- cmdline: '\"foo\" \"bar\" \"car\"'
buffer_size: 12
result: ['foo', 'bar', 'car']
- cmdline: '\"foo\" \"bar\" \"car\"'
arg_count_max: 3
buffer_size: 12
result: ['foo', 'bar', 'car']
- cmdline: '\"foo\" \"bar\" \"car\"'
arg_count_max: 2
error: 'too many args'
- cmdline: '\"foo\" \"bar\" \"car\"'
buffer_size: 11
error: 'EOF or buffer overflow'
- cmdline: '\"foo\" \"bar\" \"car\"'
arg_count_max: 2
buffer_size: 11
error: 'too many args'
- cmdline: '\\ '
result: [' ']
- cmdline: '\"\\ \"'
result: [' ']
- cmdline: '\\\\'
result: ['\\']
- cmdline: '\"\\\\\"'
result: ['\\']
- cmdline: '\\\"'
result: ['\"']
- cmdline: '\"\\\"\"'
result: ['\"']
- cmdline: 'foo\\ '
result: ['foo ']
- cmdline: '\"foo\\ \"'
result: ['foo ']
- cmdline: 'foo\\\\'
result: ['foo\\']
- cmdline: '\"foo\\\\\"'
result: ['foo\\']
- cmdline: 'foo\\\"'
result: ['foo\"']
- cmdline: '\"foo\\\"\"'
result: ['foo\"']
- cmdline: '\\ foo'
result: [' foo']
- cmdline: '\"\\ foo\"'
result: [' foo']
- cmdline: '\\\\foo'
result: ['\\foo']
- cmdline: '\"\\\\foo\"'
result: ['\\foo']
- cmdline: '\\\"foo'
result: ['\"foo']
- cmdline: '\"\\\"foo\"'
result: ['\"foo']
- cmdline: '\\ foo\\ '
result: [' foo ']
- cmdline: '\"\\ foo\\ \"'
result: [' foo ']
- cmdline: '\\\\foo\\\\'
result: ['\\foo\\']
- cmdline: '\"\\\\foo\\\\\"'
result: ['\\foo\\']
- cmdline: '\\\"foo\\\"'
result: ['\"foo\"']
- cmdline: '\"\\\"foo\\\"\"'
result: ['\"foo\"']
- cmdline: 'foo\\ bar'
result: ['foo bar']
- cmdline: '\"foo\\ bar\"'
result: ['foo bar']
- cmdline: 'foo\\\\bar'
result: ['foo\\bar']
- cmdline: '\"foo\\\\bar\"'
result: ['foo\\bar']
- cmdline: 'foo\\\"bar'
result: ['foo\"bar']
- cmdline: '\"foo\\\"bar\"'
result: ['foo\"bar']
- cmdline: '\\ foo bar'
result: [' foo', 'bar']
- cmdline: '\"\\ foo\" bar'
result: [' foo', 'bar']
- cmdline: '\\\\foo bar'
result: ['\\foo', 'bar']
- cmdline: '\"\\\\foo\" bar'
result: ['\\foo', 'bar']
- cmdline: '\\\"foo bar'
result: ['\"foo', 'bar']
- cmdline: '\"\\\"foo\" bar'
result: ['\"foo', 'bar']
- cmdline: 'foo\\ bar'
result: ['foo ', 'bar']
- cmdline: '\"foo\\ \" bar'
result: ['foo ', 'bar']
- cmdline: 'foo\\\\ bar'
result: ['foo\\', 'bar']
- cmdline: '\"foo\\\\\" bar'
result: ['foo\\', 'bar']
- cmdline: 'foo\\\" bar'
result: ['foo\"', 'bar']
- cmdline: '\"foo\\\"\" bar'
result: ['foo\"', 'bar']
- cmdline: '\\ foo\\ bar'
result: [' foo ', 'bar']
- cmdline: '\"\\ foo\\ \" bar'
result: [' foo ', 'bar']
- cmdline: '\\\\foo\\\\ bar'
result: ['\\foo\\', 'bar']
- cmdline: '\"\\\\foo\\\\\" bar'
result: ['\\foo\\', 'bar']
- cmdline: '\\\"foo\\\" bar'
result: ['\"foo\"', 'bar']
- cmdline: '\"\\\"foo\\\"\" bar'
result: ['\"foo\"', 'bar']
- cmdline: 'foo \\ bar'
result: ['foo', ' bar']
- cmdline: 'foo \"\\ bar\"'
result: ['foo', ' bar']
- cmdline: 'foo \\\\bar'
result: ['foo', '\\bar']
- cmdline: 'foo \"\\\\bar\"'
result: ['foo', '\\bar']
- cmdline: 'foo \\\"bar'
result: ['foo', '\"bar']
- cmdline: 'foo \"\\\"bar\"'
result: ['foo', '\"bar']
- cmdline: 'foo bar\\ '
result: ['foo', 'bar ']
- cmdline: 'foo \"bar\\ \"'
result: ['foo', 'bar ']
- cmdline: 'foo bar\\\\'
result: ['foo', 'bar\\']
- cmdline: 'foo \"bar\\\\\"'
result: ['foo', 'bar\\']
- cmdline: 'foo bar\\\"'
result: ['foo', 'bar\"']
- cmdline: 'foo \"bar\\\"\"'
result: ['foo', 'bar\"']
- cmdline: 'foo \\ bar\\ '
result: ['foo', ' bar ']
- cmdline: 'foo \"\\ bar\\ \"'
result: ['foo', ' bar ']
- cmdline: 'foo \\\\bar\\\\'
result: ['foo', '\\bar\\']
- cmdline: 'foo \"\\\\bar\\\\\"'
result: ['foo', '\\bar\\']
- cmdline: 'foo \\\"bar\\\"'
result: ['foo', '\"bar\"']
- cmdline: 'foo \"\\\"bar\\\"\"'
result: ['foo', '\"bar\"']
- cmdline: 'foo\\ bar car'
result: ["foo bar", "car"]
- cmdline: '\"foo bar\" car'
result: ["foo bar", "car"]
- cmdline: '\"foo bar\" \"car\"'
result: ["foo bar", "car"]
- cmdline: 'foo bar\\ car'
result: ['foo', 'bar car']
- cmdline: 'foo \"bar car\"'
result: ['foo', 'bar car']
- cmdline: '\"foo\" \"bar car\"'
result: ['foo', 'bar car']