spec test index / oilshell.org
96 passed, 18 OK, 20 not implemented, 0 BUG, 13 failed, 0 timeouts, 0 cases skipped 1 failed under osh
osh_.cc | 3 printf -v a[1] [osh_.cc stdout] Expected "status=0\n['a', 'foo', 'c']\n", got "['a', 'foo', 'c']\nstatus=0\n" stdout: ['a', 'foo', 'c'] status=0stderr: dumb_alloc: gNumNew = 2514 gNumDelete = 243 gMemPos = 83056 gNumMalloc = 309 gNumFree = 0 gMemPos2 = 13632 |
osh | 6 dynamic declare instead of %q stdout: $'"quoted" with spaces and \\'stderr: |
osh_.py | 6 dynamic declare instead of %q stdout: $'"quoted" with spaces and \\'stderr: |
osh_.cc | 6 dynamic declare instead of %q stdout: $'"quoted" with spaces and \\'stderr: dumb_alloc: gNumNew = 2062 gNumDelete = 170 gMemPos = 70768 gNumMalloc = 133 gNumFree = 1 gMemPos2 = 10896 |
osh | 7 printf -v dynamic scope stdout: dollar=dollar -- dollar='$' mylocal=mylocal -- dollar='$' mylocal=stderr: |
osh_.py | 7 printf -v dynamic scope stdout: dollar=dollar -- dollar='$' mylocal=mylocal -- dollar='$' mylocal=stderr: |
osh_.cc | 7 printf -v dynamic scope stdout: dollar=dollar -- dollar='$' mylocal=mylocal -- dollar='$' mylocal=stderr: dumb_alloc: gNumNew = 3504 gNumDelete = 387 gMemPos = 110576 gNumMalloc = 636 gNumFree = 0 gMemPos2 = 18848 |
osh_.cc | 17 printf %6.4s does both truncation and padding [osh_.cc stdout] Expected '[ foo]\n[ foo]\n[foo ]\n[spam-eggs]\n[ spam]\n[spam ]\n', got '[ foo]\n[ foo\x00]\n[foo\x00 ]\n[spam-eggs]\n[ spam]\n[spam ]\n' stdout: [ foo] [ foo ] [foo ] [spam-eggs] [ spam] [spam ]stderr: dumb_alloc: gNumNew = 2694 gNumDelete = 274 gMemPos = 88512 gNumMalloc = 398 gNumFree = 0 gMemPos2 = 15008 |
osh | 22 empty string (osh is more strict) stdout: stderr: printf '%d\n' '' ^ [ stdin ]:1: printf expected an integer, got '' |
osh_.py | 22 empty string (osh is more strict) stdout: stderr: printf '%d\n' '' ^ [ stdin ]:1: printf expected an integer, got '' |
osh_.cc | 22 empty string (osh is more strict) stdout: stderr: printf '%d\n' '' ^ [ stdin ]:1: printf expected an integer, got '' dumb_alloc: gNumNew = 1834 gNumDelete = 123 gMemPos = 63600 gNumMalloc = 80 gNumFree = 0 gMemPos2 = 9888 |
osh | 24 Unicode char with ' (osh is more strict) [osh stdout] Expected '3bc\n', got 'ce\n' stdout: cestderr: |
osh_.py | 24 Unicode char with ' (osh is more strict) [osh_.py stdout] Expected '3bc\n', got 'ce\n' stdout: cestderr: |
osh_.cc | 24 Unicode char with ' (osh is more strict) [osh_.cc stdout] Expected '3bc\n', got 'ce\n' stdout: cestderr: dumb_alloc: gNumNew = 1851 gNumDelete = 133 gMemPos = 63984 gNumMalloc = 85 gNumFree = 0 gMemPos2 = 9952 |
osh | 25 negative numbers with unsigned / octal / hex stdout: stderr: [%u]\n ^ [ printf word at line 1 of [ stdin ] ]:1: fatal: Can't format negative number -42 with %u |
osh_.py | 25 negative numbers with unsigned / octal / hex stdout: stderr: [%u]\n ^ [ printf word at line 1 of [ stdin ] ]:1: fatal: Can't format negative number -42 with %u |
osh_.cc | 25 negative numbers with unsigned / octal / hex stdout: stderr: printf '[%u]\n' -42 ^~~~~~ [ stdin ]:1: fatal: Can't format negative number -42 with %u dumb_alloc: gNumNew = 1840 gNumDelete = 125 gMemPos = 63792 gNumMalloc = 81 gNumFree = 0 gMemPos2 = 9904 |
osh | 26 printf floating point (not required, but they all implement it) stdout: stderr: [%f]\n ^ [ printf word at line 1 of [ stdin ] ]:1: osh printf doesn't support floating point [%.2f]\n ^ [ printf word at line 2 of [ stdin ] ]:1: osh printf doesn't support floating point [%8.2f]\n ^ [ printf word at line 3 of [ stdin ] ]:1: osh printf doesn't support floating point [%-8.2f]\n ^ [ printf word at line 4 of [ stdin ] ]:1: osh printf doesn't support floating point [%-f]\n ^ [ printf word at line 5 of [ stdin ] ]:1: osh printf doesn't support floating point [%-f]\n ^ [ printf word at line 6 of [ stdin ] ]:1: osh printf doesn't support floating point |
osh_.py | 26 printf floating point (not required, but they all implement it) stdout: stderr: [%f]\n ^ [ printf word at line 1 of [ stdin ] ]:1: osh printf doesn't support floating point [%.2f]\n ^ [ printf word at line 2 of [ stdin ] ]:1: osh printf doesn't support floating point [%8.2f]\n ^ [ printf word at line 3 of [ stdin ] ]:1: osh printf doesn't support floating point [%-8.2f]\n ^ [ printf word at line 4 of [ stdin ] ]:1: osh printf doesn't support floating point [%-f]\n ^ [ printf word at line 5 of [ stdin ] ]:1: osh printf doesn't support floating point [%-f]\n ^ [ printf word at line 6 of [ stdin ] ]:1: osh printf doesn't support floating point |
osh_.cc | 26 printf floating point (not required, but they all implement it) stdout: stderr: [%f]\n ^ [ printf word at line 1 of [ stdin ] ]:1: osh printf doesn't support floating point [%.2f]\n ^ [ printf word at line 2 of [ stdin ] ]:1: osh printf doesn't support floating point [%8.2f]\n ^ [ printf word at line 3 of [ stdin ] ]:1: osh printf doesn't support floating point [%-8.2f]\n ^ [ printf word at line 4 of [ stdin ] ]:1: osh printf doesn't support floating point [%-f]\n ^ [ printf word at line 5 of [ stdin ] ]:1: osh printf doesn't support floating point [%-f]\n ^ [ printf word at line 6 of [ stdin ] ]:1: osh printf doesn't support floating point dumb_alloc: gNumNew = 2728 gNumDelete = 253 gMemPos = 89744 gNumMalloc = 424 gNumFree = 0 gMemPos2 = 15376 |
osh | 27 printf floating point with - and 0 stdout: ---stderr: [%8.4f]\n ^ [ printf word at line 1 of [ stdin ] ]:1: osh printf doesn't support floating point [%08.4f]\n ^ [ printf word at line 2 of [ stdin ] ]:1: osh printf doesn't support floating point [%8.04f]\n ^ [ printf word at line 3 of [ stdin ] ]:1: Expected a printf format character [%08.04f]\n ^ [ printf word at line 4 of [ stdin ] ]:1: Expected a printf format character [%-8.4f]\n ^ [ printf word at line 6 of [ stdin ] ]:1: osh printf doesn't support floating point [%-08.4f]\n ^ [ printf word at line 7 of [ stdin ] ]:1: osh printf doesn't support floating point [%-8.04f]\n ^ [ printf word at line 8 of [ stdin ] ]:1: Expected a printf format character [%-08.04f]\n ^ [ printf word at line 9 of [ stdin ] ]:1: Expected a printf format character |
osh_.py | 27 printf floating point with - and 0 stdout: ---stderr: [%8.4f]\n ^ [ printf word at line 1 of [ stdin ] ]:1: osh printf doesn't support floating point [%08.4f]\n ^ [ printf word at line 2 of [ stdin ] ]:1: osh printf doesn't support floating point [%8.04f]\n ^ [ printf word at line 3 of [ stdin ] ]:1: Expected a printf format character [%08.04f]\n ^ [ printf word at line 4 of [ stdin ] ]:1: Expected a printf format character [%-8.4f]\n ^ [ printf word at line 6 of [ stdin ] ]:1: osh printf doesn't support floating point [%-08.4f]\n ^ [ printf word at line 7 of [ stdin ] ]:1: osh printf doesn't support floating point [%-8.04f]\n ^ [ printf word at line 8 of [ stdin ] ]:1: Expected a printf format character [%-08.04f]\n ^ [ printf word at line 9 of [ stdin ] ]:1: Expected a printf format character |
osh_.cc | 27 printf floating point with - and 0 stdout: ---stderr: [%8.4f]\n ^ [ printf word at line 1 of [ stdin ] ]:1: osh printf doesn't support floating point [%08.4f]\n ^ [ printf word at line 2 of [ stdin ] ]:1: osh printf doesn't support floating point [%8.04f]\n ^ [ printf word at line 3 of [ stdin ] ]:1: Expected a printf format character [%08.04f]\n ^ [ printf word at line 4 of [ stdin ] ]:1: Expected a printf format character [%-8.4f]\n ^ [ printf word at line 6 of [ stdin ] ]:1: osh printf doesn't support floating point [%-08.4f]\n ^ [ printf word at line 7 of [ stdin ] ]:1: osh printf doesn't support floating point [%-8.04f]\n ^ [ printf word at line 8 of [ stdin ] ]:1: Expected a printf format character [%-08.04f]\n ^ [ printf word at line 9 of [ stdin ] ]:1: Expected a printf format character dumb_alloc: gNumNew = 3166 gNumDelete = 313 gMemPos = 101472 gNumMalloc = 568 gNumFree = 0 gMemPos2 = 17680 |
osh | 28 printf eE fF gG stdout: stderr: [%e]\n ^ [ printf word at line 1 of [ stdin ] ]:1: osh printf doesn't support floating point [%E]\n ^ [ printf word at line 2 of [ stdin ] ]:1: osh printf doesn't support floating point [%f]\n ^ [ printf word at line 3 of [ stdin ] ]:1: osh printf doesn't support floating point [%g]\n ^ [ printf word at line 4 of [ stdin ] ]:1: osh printf doesn't support floating point [%G]\n ^ [ printf word at line 5 of [ stdin ] ]:1: osh printf doesn't support floating point |
osh_.py | 28 printf eE fF gG stdout: stderr: [%e]\n ^ [ printf word at line 1 of [ stdin ] ]:1: osh printf doesn't support floating point [%E]\n ^ [ printf word at line 2 of [ stdin ] ]:1: osh printf doesn't support floating point [%f]\n ^ [ printf word at line 3 of [ stdin ] ]:1: osh printf doesn't support floating point [%g]\n ^ [ printf word at line 4 of [ stdin ] ]:1: osh printf doesn't support floating point [%G]\n ^ [ printf word at line 5 of [ stdin ] ]:1: osh printf doesn't support floating point |
osh_.cc | 28 printf eE fF gG stdout: stderr: [%e]\n ^ [ printf word at line 1 of [ stdin ] ]:1: osh printf doesn't support floating point [%E]\n ^ [ printf word at line 2 of [ stdin ] ]:1: osh printf doesn't support floating point [%f]\n ^ [ printf word at line 3 of [ stdin ] ]:1: osh printf doesn't support floating point [%g]\n ^ [ printf word at line 4 of [ stdin ] ]:1: osh printf doesn't support floating point [%G]\n ^ [ printf word at line 5 of [ stdin ] ]:1: osh printf doesn't support floating point dumb_alloc: gNumNew = 2492 gNumDelete = 225 gMemPos = 82000 gNumMalloc = 302 gNumFree = 0 gMemPos2 = 13424 |
osh_.cc | 29 printf backslash escapes [osh_.cc stdout] Expected "['a\\tb']\n['\\xe2\\x98\\xa0']\n['$e']\n['\\x1f7']\n", got '' [osh_.cc status] Expected 0, got -6 stdout: stderr: osh_eval.opt: cpp/posix.h:74: Tuple2<int, int> posix::pipe(): Assertion `0' failed. |
osh_.cc | 30 printf octal backslash escapes [osh_.cc stdout] Expected "['\\x1f7']\n['\\xff']\n", got '' [osh_.cc status] Expected 0, got -6 stdout: stderr: osh_eval.opt: cpp/posix.h:74: Tuple2<int, int> posix::pipe(): Assertion `0' failed. |
osh_.cc | 31 printf unicode backslash escapes [osh_.cc stdout] Expected "['\\xe2\\x98\\xa0']\n['\\xd9\\x9f']\n", got '' [osh_.cc status] Expected 0, got -6 stdout: stderr: osh_eval.opt: cpp/posix.h:74: Tuple2<int, int> posix::pipe(): Assertion `0' failed. |
osh | 36 printf %c -- doesn't respect UTF-8! Bad. stdout: [μμ] 0stderr: %c ^ [ printf word at line 3 of [ stdin ] ]:1: osh printf doesn't support single characters (bytes) |
osh_.py | 36 printf %c -- doesn't respect UTF-8! Bad. stdout: [μμ] 0stderr: %c ^ [ printf word at line 3 of [ stdin ] ]:1: osh printf doesn't support single characters (bytes) |
osh_.cc | 36 printf %c -- doesn't respect UTF-8! Bad. [osh_.cc stdout] Expected '[\xce\xbc\xce\xbc]\n0\n', got '' [osh_.cc status] Expected 0, got -6 stdout: stderr: osh_eval.opt: cpp/posix.h:74: Tuple2<int, int> posix::pipe(): Assertion `0' failed. |
osh | 37 printf invalid format stdout: status=2 status=2stderr: %z ^ [ printf word at line 1 of [ stdin ] ]:1: Invalid printf format character %-z ^ [ printf word at line 3 of [ stdin ] ]:1: Invalid printf format character |
osh_.py | 37 printf invalid format stdout: status=2 status=2stderr: %z ^ [ printf word at line 1 of [ stdin ] ]:1: Invalid printf format character %-z ^ [ printf word at line 3 of [ stdin ] ]:1: Invalid printf format character |
osh_.cc | 37 printf invalid format stdout: status=2 status=2stderr: %z ^ [ printf word at line 1 of [ stdin ] ]:1: Invalid printf format character %-z ^ [ printf word at line 3 of [ stdin ] ]:1: Invalid printf format character dumb_alloc: gNumNew = 2266 gNumDelete = 194 gMemPos = 75120 gNumMalloc = 227 gNumFree = 0 gMemPos2 = 12224 |
osh | 40 printf negative numbers stdout: [-42] status=0 [-42] status=0 [-42] status=0 [-42] status=0 [-42] status=0 [-42] status=0 status=1 status=1stderr: printf '[%d] ' ' -42z' ^ [ stdin ]:16: printf expected an integer, got ' -42z' printf '[%i] ' ' -42z' ^ [ stdin ]:18: printf expected an integer, got ' -42z' |
osh_.py | 40 printf negative numbers stdout: [-42] status=0 [-42] status=0 [-42] status=0 [-42] status=0 [-42] status=0 [-42] status=0 status=1 status=1stderr: printf '[%d] ' ' -42z' ^ [ stdin ]:16: printf expected an integer, got ' -42z' printf '[%i] ' ' -42z' ^ [ stdin ]:18: printf expected an integer, got ' -42z' |
osh_.cc | 40 printf negative numbers stdout: [-42] status=0 [-42] status=0 [-42] status=0 [-42] status=0 [-42] status=0 [-42] status=0 status=1 status=1stderr: printf '[%d] ' ' -42z' ^ [ stdin ]:16: printf expected an integer, got ' -42z' printf '[%i] ' ' -42z' ^ [ stdin ]:18: printf expected an integer, got ' -42z' dumb_alloc: gNumNew = 4000 gNumDelete = 485 gMemPos = 123632 gNumMalloc = 805 gNumFree = 0 gMemPos2 = 21504 |
osh | 41 printf + and space flags stdout: stderr: [%+d]\n ^ [ printf word at line 1 of [ stdin ] ]:1: osh printf doesn't support the '+' flag [%+d]\n ^ [ printf word at line 2 of [ stdin ] ]:1: osh printf doesn't support the '+' flag [% d]\n ^ [ printf word at line 3 of [ stdin ] ]:1: osh printf doesn't support the ' ' flag [% d]\n ^ [ printf word at line 4 of [ stdin ] ]:1: osh printf doesn't support the ' ' flag |
osh_.py | 41 printf + and space flags stdout: stderr: [%+d]\n ^ [ printf word at line 1 of [ stdin ] ]:1: osh printf doesn't support the '+' flag [%+d]\n ^ [ printf word at line 2 of [ stdin ] ]:1: osh printf doesn't support the '+' flag [% d]\n ^ [ printf word at line 3 of [ stdin ] ]:1: osh printf doesn't support the ' ' flag [% d]\n ^ [ printf word at line 4 of [ stdin ] ]:1: osh printf doesn't support the ' ' flag |
osh_.cc | 41 printf + and space flags stdout: stderr: [%+d]\n ^ [ printf word at line 1 of [ stdin ] ]:1: osh printf doesn't support the '+' flag [%+d]\n ^ [ printf word at line 2 of [ stdin ] ]:1: osh printf doesn't support the '+' flag [% d]\n ^ [ printf word at line 3 of [ stdin ] ]:1: osh printf doesn't support the ' ' flag [% d]\n ^ [ printf word at line 4 of [ stdin ] ]:1: osh printf doesn't support the ' ' flag dumb_alloc: gNumNew = 2308 gNumDelete = 197 gMemPos = 76800 gNumMalloc = 229 gNumFree = 0 gMemPos2 = 12256 |
osh | 42 printf # flag stdout: ---stderr: [%#o][%#o]\n ^ [ printf word at line 1 of [ stdin ] ]:1: osh printf doesn't support the '#' flag [%#x][%#x]\n ^ [ printf word at line 2 of [ stdin ] ]:1: osh printf doesn't support the '#' flag [%#X][%#X]\n ^ [ printf word at line 3 of [ stdin ] ]:1: osh printf doesn't support the '#' flag [%.0f][%#.0f]\n ^ [ printf word at line 5 of [ stdin ] ]:1: osh printf doesn't support floating point [%g][%#g]\n ^ [ printf word at line 6 of [ stdin ] ]:1: osh printf doesn't support floating point |
osh_.py | 42 printf # flag stdout: ---stderr: [%#o][%#o]\n ^ [ printf word at line 1 of [ stdin ] ]:1: osh printf doesn't support the '#' flag [%#x][%#x]\n ^ [ printf word at line 2 of [ stdin ] ]:1: osh printf doesn't support the '#' flag [%#X][%#X]\n ^ [ printf word at line 3 of [ stdin ] ]:1: osh printf doesn't support the '#' flag [%.0f][%#.0f]\n ^ [ printf word at line 5 of [ stdin ] ]:1: osh printf doesn't support floating point [%g][%#g]\n ^ [ printf word at line 6 of [ stdin ] ]:1: osh printf doesn't support floating point |
osh_.cc | 42 printf # flag stdout: ---stderr: [%#o][%#o]\n ^ [ printf word at line 1 of [ stdin ] ]:1: osh printf doesn't support the '#' flag [%#x][%#x]\n ^ [ printf word at line 2 of [ stdin ] ]:1: osh printf doesn't support the '#' flag [%#X][%#X]\n ^ [ printf word at line 3 of [ stdin ] ]:1: osh printf doesn't support the '#' flag [%.0f][%#.0f]\n ^ [ printf word at line 5 of [ stdin ] ]:1: osh printf doesn't support floating point [%g][%#g]\n ^ [ printf word at line 6 of [ stdin ] ]:1: osh printf doesn't support floating point dumb_alloc: gNumNew = 2690 gNumDelete = 244 gMemPos = 87520 gNumMalloc = 351 gNumFree = 0 gMemPos2 = 14208 |
osh | 43 Runtime error for invalid integer stdout: status=1 status=1stderr: printf '%d\n' $x ^~ [ stdin ]:2: printf expected an integer, got '3abc' printf '%d\n' xyz ^~~ [ stdin ]:4: printf expected an integer, got 'xyz' |
osh_.py | 43 Runtime error for invalid integer stdout: status=1 status=1stderr: printf '%d\n' $x ^~ [ stdin ]:2: printf expected an integer, got '3abc' printf '%d\n' xyz ^~~ [ stdin ]:4: printf expected an integer, got 'xyz' |
osh_.cc | 43 Runtime error for invalid integer stdout: status=1 status=1stderr: printf '%d\n' $x ^~ [ stdin ]:2: printf expected an integer, got '3abc' printf '%d\n' xyz ^~~ [ stdin ]:4: printf expected an integer, got 'xyz' dumb_alloc: gNumNew = 2338 gNumDelete = 201 gMemPos = 77488 gNumMalloc = 269 gNumFree = 0 gMemPos2 = 12928 |
osh_.cc | 44 %(strftime format)T [osh_.cc stdout] Expected '2019-05-16\n2019-05-15\nstatus=0\n', got '' [osh_.cc status] Expected 0, got -6 stdout: stderr: osh_eval.opt: cpp/posix.h:83: int posix::putenv(Str*, Str*): Assertion `0' failed. |
osh_.cc | 45 %(strftime format)T doesn't respect TZ if not exported [osh_.cc stdout] Expected 'not equal\n', got '' [osh_.cc status] Expected 0, got -6 stdout: stderr: osh_eval.opt: cpp/posix.h:74: Tuple2<int, int> posix::pipe(): Assertion `0' failed. |
osh_.cc | 46 %(strftime format)T TZ in environ but not in shell's memory [osh_.cc stdout] Expected 'not equal\n', got '' [osh_.cc status] Expected 0, got -6 stdout: stderr: osh_eval.opt: cpp/posix.h:74: Tuple2<int, int> posix::pipe(): Assertion `0' failed. |
osh_.cc | 47 %10.5(strftime format)T [osh_.cc stdout] Expected '[ 2019-]\n[ 2019-]\nstatus=0\n', got '' [osh_.cc status] Expected 0, got -6 stdout: stderr: osh_eval.opt: cpp/posix.h:83: int posix::putenv(Str*, Str*): Assertion `0' failed. |