Results for ysh-stdlib-args.test.sh

statusyshysh_ALT
FAIL 99
total99
caseyshysh_ALTdescription
0FAIL FAIL args.ysh example usage
detailsdetails
1FAIL FAIL Bool flag, positional args, more positional
detailsdetails
2FAIL FAIL Test multiple ARGVs against a parser
detailsdetails
3FAIL FAIL Basic help message
detailsdetails
4FAIL FAIL Compare parseArgs() vs Python argparse
detailsdetails
5FAIL FAIL Define spec and print it
detailsdetails
6FAIL FAIL Default values
detailsdetails
7FAIL FAIL Duplicate argument/flag names
detailsdetails
8FAIL FAIL Error cases
detailsdetails
0 passed, 0 OK, 0 not implemented, 0 BUG, 18 failed, 0 timeouts, 0 cases skipped
9 failed under osh

Details on runs that didn't PASS

ysh0 args.ysh example usage

[ysh stdout] Expected 'Verbose false\n(Dict) {"src":"mysrc","max-procs":12,"dest":"mydest","files":["a","b","c"],"verbose":false,"invert":true}\n' Got ''
[ysh status] Expected 0, got 1

stdout:
stderr: 
    flag -v --verbose (help="Verbosely")  # default is Bool, false
                      ^
[ stdin ]:4: fatal: 'flag' appears to be external. External commands don't accept typed args (OILS-ERR-200)
ysh_ALT0 args.ysh example usage

[ysh_ALT stdout] Expected 'Verbose false\n(Dict) {"src":"mysrc","max-procs":12,"dest":"mydest","files":["a","b","c"],"verbose":false,"invert":true}\n' Got ''
[ysh_ALT status] Expected 0, got 1

stdout:
stderr: 
    flag -v --verbose (help="Verbosely")  # default is Bool, false
                      ^
[ stdin ]:4: fatal: 'flag' appears to be external. External commands don't accept typed args (OILS-ERR-200)
ysh1 Bool flag, positional args, more positional

[ysh 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 status] Expected 0, got 1

stdout:
stderr: 
    flag -v --verbose ('bool')
                      ^
[ stdin ]:4: fatal: 'flag' appears to be external. External commands don't accept typed args (OILS-ERR-200)
ysh_ALT1 Bool flag, positional args, more positional

[ysh_ALT 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_ALT status] Expected 0, got 1

stdout:
stderr: 
    flag -v --verbose ('bool')
                      ^
[ stdin ]:4: fatal: 'flag' appears to be external. External commands don't accept typed args (OILS-ERR-200)
ysh2 Test multiple ARGVs against a parser

[ysh 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 status] Expected 0, got 1

stdout:
stderr: 
    flag -v --verbose ('bool', default=false)
                      ^
[ stdin ]:4: fatal: 'flag' appears to be external. External commands don't accept typed args (OILS-ERR-200)
ysh_ALT2 Test multiple ARGVs against a parser

[ysh_ALT 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_ALT status] Expected 0, got 1

stdout:
stderr: 
    flag -v --verbose ('bool', default=false)
                      ^
[ stdin ]:4: fatal: 'flag' appears to be external. External commands don't accept typed args (OILS-ERR-200)
ysh3 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 36406: command.Simple failed with status 127
ysh_ALT3 Basic help message

[ysh_ALT 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_ALT status] Expected 0, got 127

stdout:
stderr: 
    description '''
    ^~~~~~~~~~~
[ stdin ]:4: 'description' not found (OILS-ERR-100)
[ stdin ]:4: errexit PID 36409: command.Simple failed with status 127
ysh4 Compare parseArgs() vs Python argparse

[ysh 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 '---------- -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\n'
[ysh status] Expected 0, got 127

stdout:
----------  -v --count 120 example.sh  ----------
$ bin/ysh example.sh -v --count 120 example.sh
(Dict)   {"verbose":true,"count":120,"file":"example.sh"}

$ python3 example.py -v --count 120 example.sh
stderr:
    python3 -c $argparse_py @args
    ^~~~~~~
[ stdin ]:42: 'python3' not found (OILS-ERR-100)
[ stdin ]:42: errexit PID 36410: command.Simple failed with status 127
ysh_ALT4 Compare parseArgs() vs Python argparse

[ysh_ALT 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 '---------- -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\n'
[ysh_ALT status] Expected 0, got 127

stdout:
----------  -v --count 120 example.sh  ----------
$ bin/ysh example.sh -v --count 120 example.sh
(Dict)   {"verbose":true,"count":120,"file":"example.sh"}

$ python3 example.py -v --count 120 example.sh
stderr:
    python3 -c $argparse_py @args
    ^~~~~~~
[ stdin ]:42: 'python3' not found (OILS-ERR-100)
[ stdin ]:42: errexit PID 36413: command.Simple failed with status 127
ysh5 Define spec and print it

[ysh 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 status] Expected 0, got 1

stdout:
stderr: 
    flag -v --verbose ('bool')
                      ^
[ stdin ]:4: fatal: 'flag' appears to be external. External commands don't accept typed args (OILS-ERR-200)
ysh_ALT5 Define spec and print it

[ysh_ALT 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_ALT status] Expected 0, got 1

stdout:
stderr: 
    flag -v --verbose ('bool')
                      ^
[ stdin ]:4: fatal: 'flag' appears to be external. External commands don't accept typed args (OILS-ERR-200)
ysh6 Default values

[ysh stdout] Expected '(Dict) {"sanitize":false,"verbose":false,"max-procs":null}\n' Got ''
[ysh status] Expected 0, got 1

stdout:
stderr: 
    flag -S --sanitize ('bool', default=false)
                       ^
[ stdin ]:4: fatal: 'flag' appears to be external. External commands don't accept typed args (OILS-ERR-200)
ysh_ALT6 Default values

[ysh_ALT stdout] Expected '(Dict) {"sanitize":false,"verbose":false,"max-procs":null}\n' Got ''
[ysh_ALT status] Expected 0, got 1

stdout:
stderr: 
    flag -S --sanitize ('bool', default=false)
                       ^
[ stdin ]:4: fatal: 'flag' appears to be external. External commands don't accept typed args (OILS-ERR-200)
ysh7 Duplicate argument/flag names

[ysh stdout] Expected 'status=3\nstatus=3\nstatus=3\n', got 'status=127\nstatus=127\nstatus=127\n'

stdout:
status=127
status=127
status=127
stderr:
      flag -n --name
      ^~~~
[ stdin ]:5: 'flag' not found (OILS-ERR-100)
      flag -n --name
      ^~~~
[ stdin ]:13: 'flag' not found (OILS-ERR-100)
      arg name
      ^~~
[ stdin ]:21: 'arg' not found (OILS-ERR-100)
ysh_ALT7 Duplicate argument/flag names

[ysh_ALT stdout] Expected 'status=3\nstatus=3\nstatus=3\n', got 'status=127\nstatus=127\nstatus=127\n'

stdout:
status=127
status=127
status=127
stderr:
      flag -n --name
      ^~~~
[ stdin ]:5: 'flag' not found (OILS-ERR-100)
      flag -n --name
      ^~~~
[ stdin ]:13: 'flag' not found (OILS-ERR-100)
      arg name
      ^~~
[ stdin ]:21: 'arg' not found (OILS-ERR-100)
ysh8 Error cases

[ysh stdout] Expected 'status=2\nstatus=2\nstatus=2\nstatus=2\nstatus=2\nstatus=2\n' Got ''
[ysh status] Expected 0, got 127

stdout:
stderr: 
    flag -v --verbose
    ^~~~
[ stdin ]:4: 'flag' not found (OILS-ERR-100)
[ stdin ]:4: errexit PID 36426: command.Simple failed with status 127
ysh_ALT8 Error cases

[ysh_ALT stdout] Expected 'status=2\nstatus=2\nstatus=2\nstatus=2\nstatus=2\nstatus=2\n' Got ''
[ysh_ALT status] Expected 0, got 127

stdout:
stderr: 
    flag -v --verbose
    ^~~~
[ stdin ]:4: 'flag' not found (OILS-ERR-100)
[ stdin ]:4: errexit PID 36429: command.Simple failed with status 127