spec test index / oilshell.org
status | ysh | ysh-cpp | |
pass | 8 | 0 | |
FAIL | 1 | 9 | |
total | 9 | 9 | |
case | ysh | ysh-cpp | description |
0 | pass | FAIL | args.ysh example usage |
details | |||
1 | pass | FAIL | Bool flag, positional args, more positional |
details | |||
2 | pass | FAIL | Test multiple ARGVs against a parser |
details | |||
3 | FAIL | FAIL | Basic help message |
details | details | ||
4 | pass | FAIL | Compare parseArgs() vs Python argparse |
details | |||
5 | pass | FAIL | Define spec and print it |
details | |||
6 | pass | FAIL | Default values |
details | |||
7 | pass | FAIL | Duplicate argument/flag names |
details | |||
8 | pass | FAIL | Error cases |
details |
8 passed, 0 OK, 0 not implemented, 0 BUG, 1 failed, 0 timeouts, 0 cases skipped 1 failed under osh
ysh-cpp | 0 args.ysh example usage [ysh-cpp stdout] Expected 'Verbose false\n(Dict) {"src":"mysrc","max-procs":12,"dest":"mydest","files":["a","b","c"],"verbose":false,"invert":true}\n' Got '' [ysh-cpp status] Expected 0, got -6 stdout: stderr: terminate called after throwing an instance of 'IndexError*' timeout: the monitored command dumped core |
ysh-cpp | 1 Bool flag, positional args, more positional [ysh-cpp stdout] Expected '(Dict) {"verbose":true,"src":"src/path","dst":"dst/path","more":["x","y","z"]}\nsrc/path -> dst/path\nx\ny\nz\n' Got '' [ysh-cpp status] Expected 0, got -6 stdout: stderr: terminate called after throwing an instance of 'IndexError*' timeout: the monitored command dumped core |
ysh-cpp | 2 Test multiple ARGVs against a parser [ysh-cpp stdout] Expected '---------- -v --count 120 example.sh ----------\n$ bin/ysh example.sh -v --count 120 example.sh\n(Dict) {"verbose":true,"count":120,"file":"example.sh"}\n\n---------- -v --count 120 example.sh -v ----------\n$ bin/ysh example.sh -v --count 120 example.sh -v\n(Dict) {"verbose":true,"count":120,"file":"example.sh"}\n\n---------- -v --count 120 example.sh -v --count 150 ----------\n$ bin/ysh example.sh -v --count 120 example.sh -v --count 150\n(Dict) {"verbose":true,"count":150,"file":"example.sh"}\n\n' Got '' [ysh-cpp status] Expected 0, got -6 stdout: stderr: terminate called after throwing an instance of 'IndexError*' timeout: the monitored command dumped core |
ysh | 3 Basic help message [ysh stdout] Expected 'usage: program-name [-h] [-v] src dst\n\nReference Implementation\n\npositional arguments:\n src\n dst\n\noptions:\n -h, --help show this help message and exit\n -v, --verbose Verbose\n' Got '' [ysh status] Expected 0, got 127 stdout: stderr: description ''' ^~~~~~~~~~~ [ stdin ]:4: 'description' not found (OILS-ERR-100) [ stdin ]:4: errexit PID 32175: command.Simple failed with status 127 |
ysh-cpp | 3 Basic help message [ysh-cpp stdout] Expected 'usage: program-name [-h] [-v] src dst\n\nReference Implementation\n\npositional arguments:\n src\n dst\n\noptions:\n -h, --help show this help message and exit\n -v, --verbose Verbose\n' Got '' [ysh-cpp status] Expected 0, got -6 stdout: stderr: terminate called after throwing an instance of 'IndexError*' timeout: the monitored command dumped core |
ysh-cpp | 4 Compare parseArgs() vs Python argparse [ysh-cpp stdout] Expected '---------- -v --count 120 example.sh ----------\n$ bin/ysh example.sh -v --count 120 example.sh\n(Dict) {"verbose":true,"count":120,"file":"example.sh"}\n\n$ python3 example.py -v --count 120 example.sh\nNamespace(filename=\'example.sh\', count=\'120\', verbose=True)\n\n---------- -v --count 120 example.sh -v ----------\n$ bin/ysh example.sh -v --count 120 example.sh -v\n(Dict) {"verbose":true,"count":120,"file":"example.sh"}\n\n$ python3 example.py -v --count 120 example.sh -v\nNamespace(filename=\'example.sh\', count=\'120\', verbose=True)\n\n---------- -v --count 120 example.sh -v --count 150 ----------\n$ bin/ysh example.sh -v --count 120 example.sh -v --count 150\n(Dict) {"verbose":true,"count":150,"file":"example.sh"}\n\n$ python3 example.py -v --count 120 example.sh -v --count 150\nNamespace(filename=\'example.sh\', count=\'150\', verbose=True)\n\n' Got '' [ysh-cpp status] Expected 0, got -6 stdout: stderr: terminate called after throwing an instance of 'IndexError*' timeout: the monitored command dumped core |
ysh-cpp | 5 Define spec and print it [ysh-cpp stdout] Expected '{\n "flags": [\n {\n "short": "-v",\n "long": "--verbose",\n "name": "verbose",\n "type": "bool",\n "default": false,\n "help": null\n }\n ],\n "args": [\n {\n "name": "src",\n "help": null\n },\n {\n "name": "dst",\n "help": null\n }\n ],\n "rest": "more"\n}\n' Got '' [ysh-cpp status] Expected 0, got -6 stdout: stderr: terminate called after throwing an instance of 'IndexError*' timeout: the monitored command dumped core |
ysh-cpp | 6 Default values [ysh-cpp stdout] Expected '(Dict) {"sanitize":false,"verbose":false,"max-procs":null}\n' Got '' [ysh-cpp status] Expected 0, got -6 stdout: stderr: terminate called after throwing an instance of 'IndexError*' timeout: the monitored command dumped core |
ysh-cpp | 7 Duplicate argument/flag names [ysh-cpp stdout] Expected 'status=3\nstatus=3\nstatus=3\n', got '' [ysh-cpp status] Expected 0, got -6 stdout: stderr: terminate called after throwing an instance of 'IndexError*' timeout: the monitored command dumped core |
ysh-cpp | 8 Error cases [ysh-cpp stdout] Expected 'status=2\nstatus=2\nstatus=2\nstatus=2\nstatus=2\nstatus=2\n' Got '' [ysh-cpp status] Expected 0, got -6 stdout: stderr: terminate called after throwing an instance of 'IndexError*' timeout: the monitored command dumped core |