spec test index / oilshell.org
78 passed, 16 OK, 14 not implemented, 0 BUG, 0 failed, 0 timeouts, 0 cases skipped
osh | 6 dynamic declare instead of %q stdout: $'"quoted" with spaces and \\'stderr: |
osh-cpp | 6 dynamic declare instead of %q stdout: $'"quoted" with spaces and \\'stderr: |
osh | 7 printf -v dynamic scope stdout: dollar=dollar -- dollar='$' mylocal=mylocal -- dollar='$' mylocal=stderr: |
osh-cpp | 7 printf -v dynamic scope stdout: dollar=dollar -- dollar='$' mylocal=mylocal -- dollar='$' mylocal=stderr: |
osh | 23 empty string (osh is more strict) stdout: stderr: printf '%d\n' '' ^ [ stdin ]:1: printf expected an integer, got '' |
osh-cpp | 23 empty string (osh is more strict) stdout: stderr: printf '%d\n' '' ^ [ stdin ]:1: printf expected an integer, got '' |
osh | 27 Too large stdout: too large f4 244 364stderr: printf '%x\n' \'$too_large ^~ [ stdin ]:3: Warning: UTF-8 decode: Integer too large at offset 1 in string of 5 bytes printf '%u\n' \'$too_large ^~ [ stdin ]:4: Warning: UTF-8 decode: Integer too large at offset 1 in string of 5 bytes printf '%o\n' \'$too_large ^~ [ stdin ]:5: Warning: UTF-8 decode: Integer too large at offset 1 in string of 5 bytes |
osh-cpp | 27 Too large stdout: too large f4 244 364stderr: printf '%x\n' \'$too_large ^~ [ stdin ]:3: Warning: UTF-8 decode: Integer too large at offset 1 in string of 5 bytes printf '%u\n' \'$too_large ^~ [ stdin ]:4: Warning: UTF-8 decode: Integer too large at offset 1 in string of 5 bytes printf '%o\n' \'$too_large ^~ [ stdin ]:5: Warning: UTF-8 decode: Integer too large at offset 1 in string of 5 bytes |
osh | 28 negative numbers with unsigned / octal / hex stdout: stderr: [%u]\n ^ [ printf word at line 1 of [ stdin ] ]:1 printf '[%u]\n' -42 ^ [ stdin ]:1: fatal: Can't format negative number with %u: -42 |
osh-cpp | 28 negative numbers with unsigned / octal / hex stdout: stderr: [%u]\n ^ [ printf word at line 1 of [ stdin ] ]:1 printf '[%u]\n' -42 ^ [ stdin ]:1: fatal: Can't format negative number with %u: -42 |
osh | 29 printf floating point (not required, but they all implement it) stdout: stderr: [%f]\n ^ [ printf word at line 1 of [ stdin ] ]:1 printf '[%f]\n' 3.14159 ^ [ stdin ]:1: osh printf doesn't support floating point [%.2f]\n ^ [ printf word at line 2 of [ stdin ] ]:1 printf '[%.2f]\n' 3.14159 ^ [ stdin ]:2: osh printf doesn't support floating point [%8.2f]\n ^ [ printf word at line 3 of [ stdin ] ]:1 printf '[%8.2f]\n' 3.14159 ^ [ stdin ]:3: osh printf doesn't support floating point [%-8.2f]\n ^ [ printf word at line 4 of [ stdin ] ]:1 printf '[%-8.2f]\n' 3.14159 ^ [ stdin ]:4: osh printf doesn't support floating point [%-f]\n ^ [ printf word at line 5 of [ stdin ] ]:1 printf '[%-f]\n' 3.14159 ^ [ stdin ]:5: osh printf doesn't support floating point [%-f]\n ^ [ printf word at line 6 of [ stdin ] ]:1 printf '[%-f]\n' 3.14 ^ [ stdin ]:6: osh printf doesn't support floating point |
osh-cpp | 29 printf floating point (not required, but they all implement it) stdout: stderr: [%f]\n ^ [ printf word at line 1 of [ stdin ] ]:1 printf '[%f]\n' 3.14159 ^ [ stdin ]:1: osh printf doesn't support floating point [%.2f]\n ^ [ printf word at line 2 of [ stdin ] ]:1 printf '[%.2f]\n' 3.14159 ^ [ stdin ]:2: osh printf doesn't support floating point [%8.2f]\n ^ [ printf word at line 3 of [ stdin ] ]:1 printf '[%8.2f]\n' 3.14159 ^ [ stdin ]:3: osh printf doesn't support floating point [%-8.2f]\n ^ [ printf word at line 4 of [ stdin ] ]:1 printf '[%-8.2f]\n' 3.14159 ^ [ stdin ]:4: osh printf doesn't support floating point [%-f]\n ^ [ printf word at line 5 of [ stdin ] ]:1 printf '[%-f]\n' 3.14159 ^ [ stdin ]:5: osh printf doesn't support floating point [%-f]\n ^ [ printf word at line 6 of [ stdin ] ]:1 printf '[%-f]\n' 3.14 ^ [ stdin ]:6: osh printf doesn't support floating point |
osh | 30 printf floating point with - and 0 stdout: ---stderr: [%8.4f]\n ^ [ printf word at line 1 of [ stdin ] ]:1 printf '[%8.4f]\n' 3.14 ^ [ stdin ]:1: osh printf doesn't support floating point [%08.4f]\n ^ [ printf word at line 2 of [ stdin ] ]:1 printf '[%08.4f]\n' 3.14 ^ [ stdin ]:2: osh printf doesn't support floating point [%8.04f]\n ^ [ printf word at line 3 of [ stdin ] ]:1 printf '[%8.04f]\n' 3.14 # meaning less 0 ^ [ stdin ]:3: Expected a printf format character [%08.04f]\n ^ [ printf word at line 4 of [ stdin ] ]:1 printf '[%08.04f]\n' 3.14 ^ [ stdin ]:4: Expected a printf format character [%-8.4f]\n ^ [ printf word at line 6 of [ stdin ] ]:1 printf '[%-8.4f]\n' 3.14 ^ [ stdin ]:6: osh printf doesn't support floating point [%-08.4f]\n ^ [ printf word at line 7 of [ stdin ] ]:1 printf '[%-08.4f]\n' 3.14 ^ [ stdin ]:7: osh printf doesn't support floating point [%-8.04f]\n ^ [ printf word at line 8 of [ stdin ] ]:1 printf '[%-8.04f]\n' 3.14 ^ [ stdin ]:8: Expected a printf format character [%-08.04f]\n ^ [ printf word at line 9 of [ stdin ] ]:1 printf '[%-08.04f]\n' 3.14 ^ [ stdin ]:9: Expected a printf format character |
osh-cpp | 30 printf floating point with - and 0 stdout: ---stderr: [%8.4f]\n ^ [ printf word at line 1 of [ stdin ] ]:1 printf '[%8.4f]\n' 3.14 ^ [ stdin ]:1: osh printf doesn't support floating point [%08.4f]\n ^ [ printf word at line 2 of [ stdin ] ]:1 printf '[%08.4f]\n' 3.14 ^ [ stdin ]:2: osh printf doesn't support floating point [%8.04f]\n ^ [ printf word at line 3 of [ stdin ] ]:1 printf '[%8.04f]\n' 3.14 # meaning less 0 ^ [ stdin ]:3: Expected a printf format character [%08.04f]\n ^ [ printf word at line 4 of [ stdin ] ]:1 printf '[%08.04f]\n' 3.14 ^ [ stdin ]:4: Expected a printf format character [%-8.4f]\n ^ [ printf word at line 6 of [ stdin ] ]:1 printf '[%-8.4f]\n' 3.14 ^ [ stdin ]:6: osh printf doesn't support floating point [%-08.4f]\n ^ [ printf word at line 7 of [ stdin ] ]:1 printf '[%-08.4f]\n' 3.14 ^ [ stdin ]:7: osh printf doesn't support floating point [%-8.04f]\n ^ [ printf word at line 8 of [ stdin ] ]:1 printf '[%-8.04f]\n' 3.14 ^ [ stdin ]:8: Expected a printf format character [%-08.04f]\n ^ [ printf word at line 9 of [ stdin ] ]:1 printf '[%-08.04f]\n' 3.14 ^ [ stdin ]:9: Expected a printf format character |
osh | 31 printf eE fF gG stdout: stderr: [%e]\n ^ [ printf word at line 1 of [ stdin ] ]:1 printf '[%e]\n' 3.14 ^ [ stdin ]:1: osh printf doesn't support floating point [%E]\n ^ [ printf word at line 2 of [ stdin ] ]:1 printf '[%E]\n' 3.14 ^ [ stdin ]:2: osh printf doesn't support floating point [%f]\n ^ [ printf word at line 3 of [ stdin ] ]:1 printf '[%f]\n' 3.14 ^ [ stdin ]:3: osh printf doesn't support floating point [%g]\n ^ [ printf word at line 4 of [ stdin ] ]:1 printf '[%g]\n' 3.14 ^ [ stdin ]:4: osh printf doesn't support floating point [%G]\n ^ [ printf word at line 5 of [ stdin ] ]:1 printf '[%G]\n' 3.14 ^ [ stdin ]:5: osh printf doesn't support floating point |
osh-cpp | 31 printf eE fF gG stdout: stderr: [%e]\n ^ [ printf word at line 1 of [ stdin ] ]:1 printf '[%e]\n' 3.14 ^ [ stdin ]:1: osh printf doesn't support floating point [%E]\n ^ [ printf word at line 2 of [ stdin ] ]:1 printf '[%E]\n' 3.14 ^ [ stdin ]:2: osh printf doesn't support floating point [%f]\n ^ [ printf word at line 3 of [ stdin ] ]:1 printf '[%f]\n' 3.14 ^ [ stdin ]:3: osh printf doesn't support floating point [%g]\n ^ [ printf word at line 4 of [ stdin ] ]:1 printf '[%g]\n' 3.14 ^ [ stdin ]:4: osh printf doesn't support floating point [%G]\n ^ [ printf word at line 5 of [ stdin ] ]:1 printf '[%G]\n' 3.14 ^ [ stdin ]:5: osh printf doesn't support floating point |
osh | 39 printf %c -- doesn't respect UTF-8! Bad. stdout: [μμ] 0stderr: %c ^ [ printf word at line 3 of [ stdin ] ]:1 printf '%c' "$twomu" | wc --bytes ^ [ stdin ]:3: osh printf doesn't support single characters (bytes) |
osh-cpp | 39 printf %c -- doesn't respect UTF-8! Bad. stdout: [μμ] 0stderr: %c ^ [ printf word at line 3 of [ stdin ] ]:1 printf '%c' "$twomu" | wc --bytes ^ [ stdin ]:3: osh printf doesn't support single characters (bytes) |
osh | 40 printf invalid format stdout: status=2 status=2stderr: %z ^ [ printf word at line 1 of [ stdin ] ]:1 printf '%z' 42 ^ [ stdin ]:1: Invalid printf format character %-z ^ [ printf word at line 3 of [ stdin ] ]:1 printf '%-z' 42 ^ [ stdin ]:3: Invalid printf format character |
osh-cpp | 40 printf invalid format stdout: status=2 status=2stderr: %z ^ [ printf word at line 1 of [ stdin ] ]:1 printf '%z' 42 ^ [ stdin ]:1: Invalid printf format character %-z ^ [ printf word at line 3 of [ stdin ] ]:1 printf '%-z' 42 ^ [ stdin ]:3: Invalid printf format character |
osh | 43 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-cpp | 43 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 | 44 printf + and space flags stdout: stderr: [%+d]\n ^ [ printf word at line 1 of [ stdin ] ]:1 printf '[%+d]\n' 42 ^ [ stdin ]:1: osh printf doesn't support the '+' flag [%+d]\n ^ [ printf word at line 2 of [ stdin ] ]:1 printf '[%+d]\n' -42 ^ [ stdin ]:2: osh printf doesn't support the '+' flag [% d]\n ^ [ printf word at line 3 of [ stdin ] ]:1 printf '[% d]\n' 42 ^ [ stdin ]:3: osh printf doesn't support the ' ' flag [% d]\n ^ [ printf word at line 4 of [ stdin ] ]:1 printf '[% d]\n' -42 ^ [ stdin ]:4: osh printf doesn't support the ' ' flag |
osh-cpp | 44 printf + and space flags stdout: stderr: [%+d]\n ^ [ printf word at line 1 of [ stdin ] ]:1 printf '[%+d]\n' 42 ^ [ stdin ]:1: osh printf doesn't support the '+' flag [%+d]\n ^ [ printf word at line 2 of [ stdin ] ]:1 printf '[%+d]\n' -42 ^ [ stdin ]:2: osh printf doesn't support the '+' flag [% d]\n ^ [ printf word at line 3 of [ stdin ] ]:1 printf '[% d]\n' 42 ^ [ stdin ]:3: osh printf doesn't support the ' ' flag [% d]\n ^ [ printf word at line 4 of [ stdin ] ]:1 printf '[% d]\n' -42 ^ [ stdin ]:4: osh printf doesn't support the ' ' flag |
osh | 45 printf # flag stdout: ---stderr: [%#o][%#o]\n ^ [ printf word at line 1 of [ stdin ] ]:1 printf '[%#o][%#o]\n' 0 42 ^ [ stdin ]:1: osh printf doesn't support the '#' flag [%#x][%#x]\n ^ [ printf word at line 2 of [ stdin ] ]:1 printf '[%#x][%#x]\n' 0 42 ^ [ stdin ]:2: osh printf doesn't support the '#' flag [%#X][%#X]\n ^ [ printf word at line 3 of [ stdin ] ]:1 printf '[%#X][%#X]\n' 0 42 ^ [ stdin ]:3: osh printf doesn't support the '#' flag [%.0f][%#.0f]\n ^ [ printf word at line 5 of [ stdin ] ]:1 printf '[%.0f][%#.0f]\n' 3 3 ^ [ stdin ]:5: osh printf doesn't support floating point [%g][%#g]\n ^ [ printf word at line 6 of [ stdin ] ]:1 printf '[%g][%#g]\n' 3 3 ^ [ stdin ]:6: osh printf doesn't support floating point |
osh-cpp | 45 printf # flag stdout: ---stderr: [%#o][%#o]\n ^ [ printf word at line 1 of [ stdin ] ]:1 printf '[%#o][%#o]\n' 0 42 ^ [ stdin ]:1: osh printf doesn't support the '#' flag [%#x][%#x]\n ^ [ printf word at line 2 of [ stdin ] ]:1 printf '[%#x][%#x]\n' 0 42 ^ [ stdin ]:2: osh printf doesn't support the '#' flag [%#X][%#X]\n ^ [ printf word at line 3 of [ stdin ] ]:1 printf '[%#X][%#X]\n' 0 42 ^ [ stdin ]:3: osh printf doesn't support the '#' flag [%.0f][%#.0f]\n ^ [ printf word at line 5 of [ stdin ] ]:1 printf '[%.0f][%#.0f]\n' 3 3 ^ [ stdin ]:5: osh printf doesn't support floating point [%g][%#g]\n ^ [ printf word at line 6 of [ stdin ] ]:1 printf '[%g][%#g]\n' 3 3 ^ [ stdin ]:6: osh printf doesn't support floating point |
osh | 46 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-cpp | 46 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 | 52 bash truncates long strftime string at 128 stdout: 4 40 120 124 128stderr: |
osh-cpp | 52 bash truncates long strftime string at 128 stdout: 4 40 120 124 128stderr: |