spec test index / oilshell.org
198 passed, 19 OK, 69 not implemented, 6 BUG, 1 failed, 0 timeouts, 0 cases skipped 1 failed under osh
mksh | 0 printf with no args stdout: stderr: printf: missing operand Try 'printf --help' for more information. |
zsh | 0 printf with no args stdout: stderr: printf: not enough arguments |
dash | 1 printf -v %s stdout: ['']stderr: dash: 2: printf: Illegal option -v |
mksh | 1 printf -v %s stdout: -v['']stderr: printf: warning: ignoring excess arguments, starting with ‘foo’ |
zsh | 1 printf -v %s stdout: -v['']stderr: |
ash | 1 printf -v %s stdout: -v['']stderr: |
dash | 2 printf -v %q stdout: stderr: dash: 2: printf: Illegal option -v |
mksh | 2 printf -v %q stdout: -vstderr: printf: warning: ignoring excess arguments, starting with ‘foo’ |
zsh | 2 printf -v %q stdout: -vstderr: |
ash | 2 printf -v %q stdout: -vstderr: |
dash | 3 printf -v a[1] stdout: stderr: dash: 1: Syntax error: "(" unexpected |
mksh | 3 printf -v a[1] stdout: -vstatus=0 ['a', 'b', 'c']stderr: printf: warning: ignoring excess arguments, starting with ‘a[1]’ |
zsh | 3 printf -v a[1] stdout: -vstatus=0 ['a', 'b', 'c']stderr: |
ash | 3 printf -v a[1] stdout: stderr: ash: syntax error: unexpected "(" |
osh | 3 printf -v a[1] stdout: status=2 ['a', 'b', 'c']stderr: printf -v 'a[1]' %s 'foo' ^~~~~~ [ stdin ]:2: 'printf' got invalid variable name 'a[1]' |
osh_ALT | 3 printf -v a[1] stdout: status=2 ['a', 'b', 'c']stderr: printf -v 'a[1]' %s 'foo' ^~~~~~ [ stdin ]:2: 'printf' got invalid variable name 'a[1]' |
dash | 4 dynamic declare instead of %s stdout: ['']stderr: dash: 2: declare: not found |
mksh | 4 dynamic declare instead of %s stdout: ['']stderr: mksh: <stdin>[2]: declare: not found |
ash | 4 dynamic declare instead of %s stdout: ['']stderr: ash: declare: not found |
dash | 5 dynamic declare instead of %q stdout: stderr: dash: 3: Bad substitution |
mksh | 5 dynamic declare instead of %q stdout: stderr: mksh: <stdin>[3]: declare: not found |
zsh | 5 dynamic declare instead of %q stdout: stderr: zsh: bad substitution |
ash | 5 dynamic declare instead of %q stdout: stderr: ash: syntax error: bad substitution |
osh | 5 dynamic declare instead of %q stdout: $'"quoted" with spaces and \\'stderr: |
osh_ALT | 5 dynamic declare instead of %q stdout: $'"quoted" with spaces and \\'stderr: |
dash | 6 printf -v dynamic scope stdout: not implementedstderr: |
mksh | 6 printf -v dynamic scope stdout: not implementedstderr: |
zsh | 6 printf -v dynamic scope stdout: not implementedstderr: |
ash | 6 printf -v dynamic scope stdout: not implementedstderr: |
osh | 6 printf -v dynamic scope stdout: dollar=dollar -- dollar='$' mylocal=mylocal -- dollar='$' mylocal=stderr: |
osh_ALT | 6 printf -v dynamic scope stdout: dollar=dollar -- dollar='$' mylocal=mylocal -- dollar='$' mylocal=stderr: |
osh | 11 printf %6.4d -- precision means something different for integers !? stdout: stderr: [%6.4d]\n ^ (source.ArgvWord word_spid:2):1: precision can't be specified when here |
osh_ALT | 11 printf %6.4d -- precision means something different for integers !? stdout: stderr: [%6.4d]\n ^ (source.ArgvWord word_spid:2):1: precision can't be specified when here |
mksh | 13 printf %6.0s and %0.0s stdout: [ ] [stderr: printf: %0.0s: invalid conversion specification |
mksh | 14 printf %6.s and %0.s stdout: [ ] [stderr: printf: %0.s: invalid conversion specification |
zsh | 14 printf %6.s and %0.s stdout: [ foo] [foo]stderr: |
ash | 17 empty string (osh is more strict) stdout: 0stderr: ash: invalid number '' |
osh | 17 empty string (osh is more strict) stdout: stderr: printf '%d\n' '' ^ [ stdin ]:1: printf got invalid number '' |
osh_ALT | 17 empty string (osh is more strict) stdout: stderr: printf '%d\n' '' ^ [ stdin ]:1: printf got invalid number '' |
mksh | 18 No char after ' (osh is more strict) stdout: 0 0stderr: printf: ‘'’: expected a numeric value printf: ‘"’: expected a numeric value |
dash | 19 Unicode char with ' (osh is more strict) stdout: cestderr: |
mksh | 19 Unicode char with ' (osh is more strict) stdout: cestderr: 'printf: warning: \xbc: character(s) following character constant have been ignored\n' |
ash | 19 Unicode char with ' (osh is more strict) stdout: cestderr: |
osh | 19 Unicode char with ' (osh is more strict) [osh stdout] Expected '3bc\n', got 'ce\n' stdout: cestderr: |
osh_ALT | 19 Unicode char with ' (osh is more strict) [osh_ALT stdout] Expected '3bc\n', got 'ce\n' stdout: cestderr: |
osh | 20 negative numbers with unsigned / octal / hex stdout: stderr: [%u]\n ^ (source.ArgvWord word_spid:2):1: fatal: Can't format negative number -42 with %u |
osh_ALT | 20 negative numbers with unsigned / octal / hex stdout: stderr: [%u]\n ^ (source.ArgvWord word_spid:2):1: fatal: Can't format negative number -42 with %u |
osh | 21 printf floating point (not required, but they all implement it) stdout: stderr: [%f]\n ^ (source.ArgvWord word_spid:2):1: osh printf doesn't support floating point [%.2f]\n ^ (source.ArgvWord word_spid:13):1: osh printf doesn't support floating point [%8.2f]\n ^ (source.ArgvWord word_spid:26):1: osh printf doesn't support floating point [%-8.2f]\n ^ (source.ArgvWord word_spid:40):1: osh printf doesn't support floating point [%-f]\n ^ (source.ArgvWord word_spid:55):1: osh printf doesn't support floating point [%-f]\n ^ (source.ArgvWord word_spid:67):1: osh printf doesn't support floating point |
osh_ALT | 21 printf floating point (not required, but they all implement it) stdout: stderr: [%f]\n ^ (source.ArgvWord word_spid:2):1: osh printf doesn't support floating point [%.2f]\n ^ (source.ArgvWord word_spid:13):1: osh printf doesn't support floating point [%8.2f]\n ^ (source.ArgvWord word_spid:26):1: osh printf doesn't support floating point [%-8.2f]\n ^ (source.ArgvWord word_spid:40):1: osh printf doesn't support floating point [%-f]\n ^ (source.ArgvWord word_spid:55):1: osh printf doesn't support floating point [%-f]\n ^ (source.ArgvWord word_spid:67):1: osh printf doesn't support floating point |
osh | 22 printf floating point with - and 0 stdout: ---stderr: [%8.4f]\n ^ (source.ArgvWord word_spid:2):1: osh printf doesn't support floating point [%08.4f]\n ^ (source.ArgvWord word_spid:16):1: osh printf doesn't support floating point [%8.04f]\n ^ (source.ArgvWord word_spid:31):1: Invalid printf format character [%08.04f]\n ^ (source.ArgvWord word_spid:48):1: Invalid printf format character [%-8.4f]\n ^ (source.ArgvWord word_spid:67):1: osh printf doesn't support floating point [%-08.4f]\n ^ (source.ArgvWord word_spid:82):1: osh printf doesn't support floating point [%-8.04f]\n ^ (source.ArgvWord word_spid:98):1: Invalid printf format character [%-08.04f]\n ^ (source.ArgvWord word_spid:113):1: Invalid printf format character |
osh_ALT | 22 printf floating point with - and 0 stdout: ---stderr: [%8.4f]\n ^ (source.ArgvWord word_spid:2):1: osh printf doesn't support floating point [%08.4f]\n ^ (source.ArgvWord word_spid:16):1: osh printf doesn't support floating point [%8.04f]\n ^ (source.ArgvWord word_spid:31):1: Invalid printf format character [%08.04f]\n ^ (source.ArgvWord word_spid:48):1: Invalid printf format character [%-8.4f]\n ^ (source.ArgvWord word_spid:67):1: osh printf doesn't support floating point [%-08.4f]\n ^ (source.ArgvWord word_spid:82):1: osh printf doesn't support floating point [%-8.04f]\n ^ (source.ArgvWord word_spid:98):1: Invalid printf format character [%-08.04f]\n ^ (source.ArgvWord word_spid:113):1: Invalid printf format character |
osh | 23 printf eE fF gG stdout: stderr: [%e]\n ^ (source.ArgvWord word_spid:2):1: osh printf doesn't support floating point [%E]\n ^ (source.ArgvWord word_spid:13):1: osh printf doesn't support floating point [%f]\n ^ (source.ArgvWord word_spid:24):1: osh printf doesn't support floating point [%g]\n ^ (source.ArgvWord word_spid:35):1: osh printf doesn't support floating point [%G]\n ^ (source.ArgvWord word_spid:46):1: osh printf doesn't support floating point |
osh_ALT | 23 printf eE fF gG stdout: stderr: [%e]\n ^ (source.ArgvWord word_spid:2):1: osh printf doesn't support floating point [%E]\n ^ (source.ArgvWord word_spid:13):1: osh printf doesn't support floating point [%f]\n ^ (source.ArgvWord word_spid:24):1: osh printf doesn't support floating point [%g]\n ^ (source.ArgvWord word_spid:35):1: osh printf doesn't support floating point [%G]\n ^ (source.ArgvWord word_spid:46):1: osh printf doesn't support floating point |
dash | 24 printf backslash escapes stdout: ['a\tb'] ['\\xE2\\x98\\xA0'] ['$e'] ['\x1f7']stderr: |
dash | 26 printf unicode backslash escapes stdout: ['\\u2620'] ['\\U0000065f']stderr: |
ash | 26 printf unicode backslash escapes stdout: ['\\u2620'] ['\\U0000065f']stderr: |
dash | 31 printf %c -- doesn't respect UTF-8! Bad. stdout: [$\u03bc\u03bc] 1stderr: |
ash | 31 printf %c -- doesn't respect UTF-8! Bad. stdout: [\u03bc\u03bc] 1stderr: |
osh | 31 printf %c -- doesn't respect UTF-8! Bad. stdout: [μμ] 0stderr: %c ^ (source.ArgvWord word_spid:24):1: osh printf doesn't support single characters (bytes) |
osh_ALT | 31 printf %c -- doesn't respect UTF-8! Bad. stdout: [μμ] 0stderr: %c ^ (source.ArgvWord word_spid:24):1: osh printf doesn't support single characters (bytes) |
dash | 32 printf invalid format stdout: status=2 status=2stderr: dash: 1: printf: %z: invalid directive dash: 3: printf: %-z: invalid directive |
osh | 32 printf invalid format stdout: status=2 status=2stderr: %z ^ (source.ArgvWord word_spid:2):1: Invalid printf format character %-z ^ (source.ArgvWord word_spid:17):1: Invalid printf format character |
osh_ALT | 32 printf invalid format stdout: status=2 status=2stderr: %z ^ (source.ArgvWord word_spid:2):1: Invalid printf format character %-z ^ (source.ArgvWord word_spid:17):1: Invalid printf format character |
dash | 33 printf %q stdout: [stderr: dash: 2: printf: %q: invalid directive |
bash | 33 printf %q stdout: [a\ b]stderr: |
zsh | 33 printf %q stdout: [a\ b]stderr: |
ash | 33 printf %q stdout: [stderr: ash: %q]\n: invalid format |
dash | 34 printf %6q (width) stdout: [stderr: dash: 2: printf: %6q: invalid directive |
bash | 34 printf %6q (width) stdout: [ a\ b]stderr: |
mksh | 34 printf %6q (width) stdout: [stderr: printf: %6q: invalid conversion specification |
zsh | 34 printf %6q (width) stdout: [ a\ b]stderr: |
ash | 34 printf %6q (width) stdout: [stderr: ash: %6q]\n: invalid format |
osh | 35 printf + and space flags stdout: stderr: [%+d]\n ^ (source.ArgvWord word_spid:2):1: osh printf doesn't support the '+' flag [%+d]\n ^ (source.ArgvWord word_spid:13):1: osh printf doesn't support the '+' flag [% d]\n ^ (source.ArgvWord word_spid:24):1: osh printf doesn't support the ' ' flag [% d]\n ^ (source.ArgvWord word_spid:35):1: osh printf doesn't support the ' ' flag |
osh_ALT | 35 printf + and space flags stdout: stderr: [%+d]\n ^ (source.ArgvWord word_spid:2):1: osh printf doesn't support the '+' flag [%+d]\n ^ (source.ArgvWord word_spid:13):1: osh printf doesn't support the '+' flag [% d]\n ^ (source.ArgvWord word_spid:24):1: osh printf doesn't support the ' ' flag [% d]\n ^ (source.ArgvWord word_spid:35):1: osh printf doesn't support the ' ' flag |
osh | 36 printf # flag stdout: ---stderr: [%#o][%#o]\n ^ (source.ArgvWord word_spid:2):1: osh printf doesn't support the '#' flag [%#x][%#x]\n ^ (source.ArgvWord word_spid:15):1: osh printf doesn't support the '#' flag [%#X][%#X]\n ^ (source.ArgvWord word_spid:28):1: osh printf doesn't support the '#' flag [%.0f][%#.0f]\n ^ (source.ArgvWord word_spid:45):1: osh printf doesn't support floating point [%g][%#g]\n ^ (source.ArgvWord word_spid:60):1: osh printf doesn't support floating point |
osh_ALT | 36 printf # flag stdout: ---stderr: [%#o][%#o]\n ^ (source.ArgvWord word_spid:2):1: osh printf doesn't support the '#' flag [%#x][%#x]\n ^ (source.ArgvWord word_spid:15):1: osh printf doesn't support the '#' flag [%#X][%#X]\n ^ (source.ArgvWord word_spid:28):1: osh printf doesn't support the '#' flag [%.0f][%#.0f]\n ^ (source.ArgvWord word_spid:45):1: osh printf doesn't support floating point [%g][%#g]\n ^ (source.ArgvWord word_spid:60):1: osh printf doesn't support floating point |
zsh | 37 Runtime error for invalid integer stdout: 0 status=1 0 status=0stderr: zsh: bad math expression: operator expected at `abc' |
ash | 37 Runtime error for invalid integer stdout: 0 status=1 0 status=1stderr: ash: invalid number '3abc' ash: invalid number 'xyz' |
osh | 37 Runtime error for invalid integer stdout: status=1 status=1stderr: printf '%d\n' $x ^~ [ stdin ]:2: printf got invalid number '3abc' printf '%d\n' xyz ^~~ [ stdin ]:4: printf got invalid number 'xyz' |
osh_ALT | 37 Runtime error for invalid integer stdout: status=1 status=1stderr: printf '%d\n' $x ^~ [ stdin ]:2: printf got invalid number '3abc' printf '%d\n' xyz ^~~ [ stdin ]:4: printf got invalid number 'xyz' |
dash | 38 %(strftime format)T stdout: status=2stderr: dash: 2: printf: %(: invalid directive dash: 4: printf: %(: invalid directive |
mksh | 38 %(strftime format)T stdout: status=1stderr: printf: %(: invalid conversion specification printf: %(: invalid conversion specification |
zsh | 38 %(strftime format)T stdout: status=1stderr: printf: %(: invalid directive printf: %(: invalid directive |
ash | 38 %(strftime format)T stdout: status=1stderr: ash: %(%Y-%m-%d)T\n: invalid format ash: %(%Y-%m-%d)T\n: invalid format |
dash | 39 %(strftime format)T doesn't respect TZ if not exported stdout: stderr: dash: 2: printf: %(: invalid directive dash: 4: printf: %(: invalid directive |
mksh | 39 %(strftime format)T doesn't respect TZ if not exported stdout: stderr: printf: %(: invalid conversion specification printf: %(: invalid conversion specification |
zsh | 39 %(strftime format)T doesn't respect TZ if not exported stdout: stderr: printf: %(: invalid directive printf: %(: invalid directive |
ash | 39 %(strftime format)T doesn't respect TZ if not exported stdout: stderr: ash: %(%Y-%m-%d %H:%M:%S)T\n: invalid format ash: %(%Y-%m-%d %H:%M:%S)T\n: invalid format |
dash | 40 %(strftime format)T TZ in environ but not in shell's memory stdout: stderr: dash: 2: printf: %(: invalid directive dash: 4: printf: %(: invalid directive |
mksh | 40 %(strftime format)T TZ in environ but not in shell's memory stdout: stderr: printf: %(: invalid conversion specification printf: %(: invalid conversion specification |
zsh | 40 %(strftime format)T TZ in environ but not in shell's memory stdout: stderr: printf: %(: invalid directive printf: %(: invalid directive |
ash | 40 %(strftime format)T TZ in environ but not in shell's memory stdout: stderr: ash: %(%Y-%m-%d %H:%M:%S)T\n: invalid format ash: %(%Y-%m-%d %H:%M:%S)T\n: invalid format |
dash | 41 %10.5(strftime format)T stdout: [[status=2stderr: dash: 2: printf: %10.5(: invalid directive dash: 4: printf: %10.5(: invalid directive |
mksh | 41 %10.5(strftime format)T stdout: [[status=1stderr: printf: %10.5(: invalid conversion specification printf: %10.5(: invalid conversion specification |
zsh | 41 %10.5(strftime format)T stdout: [[status=1stderr: printf: %10.5(: invalid directive printf: %10.5(: invalid directive |
ash | 41 %10.5(strftime format)T stdout: [[status=1stderr: ash: %10.5(%Y-%m-%d)T]\n: invalid format ash: %10.5(%Y-%m-%d)T]\n: invalid format |