Results for builtin-printf.test.sh

statusbashdashashzshmkshkshtoyshsushbrushosh
pass 58393738394137144048
ok 5435600008
N-I 01817131500006
BUG-2 0001000000
BUG 0266300000
FAIL 00000222649221
TIME 0000000010
total63636363636363636363
casebashdashashzshmkshkshtoyshsushbrushoshdescription
0pass pass pass ok ok FAIL FAIL pass pass pass printf with no args
detailsdetailsdetailsdetails
1pass N-I N-I N-I N-I FAIL FAIL pass pass pass printf -v %s
detailsdetailsdetailsdetailsdetailsdetails
2pass N-I N-I N-I N-I FAIL FAIL FAIL pass pass printf -v %q
detailsdetailsdetailsdetailsdetailsdetailsdetails
3pass N-I N-I N-I N-I FAIL FAIL pass pass pass printf -v a[1]
detailsdetailsdetailsdetailsdetailsdetails
4pass pass N-I N-I N-I FAIL FAIL FAIL FAIL pass printf -v syntax error
detailsdetailsdetailsdetailsdetailsdetailsdetails
5pass N-I N-I pass N-I FAIL pass pass FAIL pass dynamic declare instead of %s
detailsdetailsdetailsdetailsdetails
6pass N-I N-I N-I N-I FAIL FAIL FAIL FAIL ok dynamic declare instead of %q
detailsdetailsdetailsdetailsdetailsdetailsdetailsdetailsdetails
7pass N-I N-I N-I N-I FAIL FAIL pass pass ok printf -v dynamic scope
detailsdetailsdetailsdetailsdetailsdetailsdetails
8pass pass pass pass pass pass pass FAIL pass pass printf with too few arguments
details
9pass pass pass pass pass pass pass FAIL pass pass printf with too many arguments
details
10pass pass pass pass pass pass pass pass pass pass printf width strings
11pass pass pass pass pass pass pass FAIL pass pass printf integer
details
12pass pass pass pass pass pass FAIL FAIL pass pass printf %6.4d -- "precision" does padding for integers
detailsdetails
13pass pass pass pass pass pass FAIL FAIL pass pass printf %6.4x X o
detailsdetails
14pass pass pass pass pass pass FAIL FAIL pass pass %06d zero padding vs. %6.6d
detailsdetails
15pass pass pass pass pass pass pass pass pass pass %06x %06X %06o
16pass pass pass pass ok FAIL pass pass FAIL pass %06s is no-op
detailsdetailsdetails
17pass pass pass pass pass pass pass FAIL pass pass printf %6.4s does both truncation and padding
details
18pass pass pass pass N-I FAIL pass FAIL FAIL pass printf %6.0s and %0.0s
detailsdetailsdetailsdetails
19pass pass pass BUG N-I FAIL pass FAIL FAIL pass printf %6.s and %0.s
detailsdetailsdetailsdetailsdetails
20pass pass pass pass pass pass pass FAIL pass pass printf %*.*s (width/precision from args)
details
21pass pass pass pass pass pass pass pass pass pass unsigned / octal / hex
22pass pass pass pass BUG FAIL pass pass pass pass unsigned / octal / hex big
detailsdetails
23pass pass ok pass pass pass pass FAIL pass ok empty string (osh is more strict)
detailsdetailsdetails
24pass pass pass pass ok FAIL pass FAIL pass pass No char after ' => zero code point
detailsdetailsdetails
25pass BUG BUG pass BUG pass FAIL FAIL pass pass Unicode char with '
detailsdetailsdetailsdetailsdetails
26pass pass pass pass pass pass pass FAIL FAIL pass Invalid UTF-8
detailsdetails
27pass BUG BUG pass BUG pass FAIL FAIL FAIL ok Too large
detailsdetailsdetailsdetailsdetailsdetailsdetails
28pass pass pass pass pass pass pass pass pass N-I negative numbers with unsigned / octal / hex
details
29pass pass pass pass pass pass pass FAIL pass N-I printf floating point (not required, but they all implement it)
detailsdetails
30pass pass pass pass pass pass pass FAIL pass N-I printf floating point with - and 0
detailsdetails
31pass pass pass pass pass pass pass FAIL pass N-I printf eE fF gG
detailsdetails
32pass N-I pass pass pass pass pass FAIL pass pass printf backslash escapes
detailsdetails
33pass pass pass pass pass pass pass FAIL FAIL pass printf octal backslash escapes
detailsdetails
34pass N-I N-I pass pass pass FAIL FAIL pass pass printf unicode backslash escapes
detailsdetailsdetailsdetails
35pass pass pass pass pass pass pass pass pass pass printf invalid backslash escape (is ignored)
36pass pass pass pass pass pass pass FAIL pass pass printf % escapes
details
37pass pass pass pass pass pass pass FAIL pass pass printf %c ASCII
details
38pass N-I N-I pass pass pass FAIL FAIL pass pass printf %c unicode - prints the first BYTE of a string - it does not respect UTF-8
detailsdetailsdetailsdetails
39pass ok pass pass pass pass pass pass pass ok printf invalid format
detailsdetails
40ok N-I N-I ok pass pass FAIL FAIL pass pass printf %q
detailsdetailsdetailsdetailsdetailsdetails
41ok N-I N-I ok N-I FAIL FAIL FAIL FAIL pass printf %6q (width)
detailsdetailsdetailsdetailsdetailsdetailsdetailsdetailsdetails
42pass pass ok ok pass pass pass FAIL FAIL FAIL printf negative numbers
detailsdetailsdetailsdetailsdetails
43pass pass pass pass pass pass pass FAIL pass N-I printf + and space flags
detailsdetails
44pass pass pass pass pass pass pass FAIL pass N-I printf # flag
detailsdetails
45pass pass BUG BUG pass pass pass FAIL FAIL ok Runtime error for invalid integer
detailsdetailsdetailsdetailsdetails
46pass N-I N-I N-I N-I FAIL FAIL FAIL FAIL pass %(strftime format)T
detailsdetailsdetailsdetailsdetailsdetailsdetailsdetails
47pass N-I N-I N-I N-I FAIL FAIL FAIL FAIL pass %(strftime format)T doesn't respect TZ if not exported
detailsdetailsdetailsdetailsdetailsdetailsdetailsdetails
48pass N-I N-I N-I N-I FAIL FAIL FAIL FAIL pass %(strftime format)T TZ in environ but not in shell's memory
detailsdetailsdetailsdetailsdetailsdetailsdetailsdetails
49pass N-I N-I N-I N-I FAIL FAIL FAIL FAIL pass %10.5(strftime format)T
detailsdetailsdetailsdetailsdetailsdetailsdetailsdetails
50pass pass pass pass pass pass pass pass TIME pass Regression for 'printf x y'
51pass N-I N-I N-I N-I FAIL FAIL FAIL FAIL ok bash truncates long strftime string at 128
detailsdetailsdetailsdetailsdetailsdetailsdetailsdetailsdetails
52ok ok BUG BUG ok FAIL FAIL FAIL FAIL pass printf positive integer overflow
detailsdetailsdetailsdetailsdetailsdetailsdetailsdetailsdetails
53ok ok BUG BUG ok FAIL FAIL FAIL FAIL pass printf negative integer overflow
detailsdetailsdetailsdetailsdetailsdetailsdetailsdetailsdetails
54pass N-I pass pass pass pass pass FAIL pass pass printf %b does backslash escaping
detailsdetails
55pass N-I N-I pass pass pass FAIL FAIL pass pass printf %b unicode escapes
detailsdetailsdetailsdetails
56pass pass pass pass pass pass pass FAIL FAIL pass printf %b respects \c early return
detailsdetails
57pass pass pass N-I pass pass pass FAIL pass pass printf %b supports octal escapes, both \141 and \0141
detailsdetails
58pass pass pass N-I pass pass pass FAIL pass pass printf %b with truncated octal escapes
detailsdetails
59pass pass pass BUG pass pass pass FAIL pass pass printf %d %X support hex 0x5 and octal 055
detailsdetails
60pass pass pass BUG pass pass pass FAIL pass pass printf %d with + prefix (positive sign)
detailsdetails
61pass pass BUG BUG-2 pass pass FAIL FAIL FAIL ok leading spaces are accepted in value given to %d %X, but not trailing spaces
detailsdetailsdetailsdetailsdetailsdetails
62ok ok ok ok ok FAIL FAIL FAIL FAIL pass Arbitrary base 64#a is rejected (unlike in shell arithmetic)
detailsdetailsdetailsdetailsdetailsdetailsdetailsdetailsdetails
391 passed, 31 OK, 69 not implemented, 18 BUG, 120 failed, 1 timeouts, 0 cases skipped
1 failed under osh

Details on runs that didn't PASS

zsh0 printf with no args

stdout:
stderr: 
printf: not enough arguments
mksh0 printf with no args

stdout:
stderr: 
printf: missing operand
Try 'printf --help' for more information.
ksh0 printf with no args

[ksh status] Expected 2 Got 1

stdout:
stderr: 
printf: missing operand
Try 'printf --help' for more information.
toysh0 printf with no args

[toysh status] Expected 2 Got 1

stdout:
stderr: 
printf: Needs 1 argument (see "printf --help")
dash1 printf -v %s

stdout:
['']
stderr:
dash: 2: printf: Illegal option -v
ash1 printf -v %s

stdout:
-v['']
stderr:
zsh1 printf -v %s

stdout:
-v['']
stderr:
mksh1 printf -v %s

stdout:
-v['']
stderr:
printf: warning: ignoring excess arguments, starting with ‘foo’
ksh1 printf -v %s

[ksh stdout] Expected "['hello there']\n" Got "-v['']\n"

stdout:
-v['']
stderr:
printf: warning: ignoring excess arguments, starting with ‘foo’
toysh1 printf -v %s

[toysh stdout] Expected "['hello there']\n" Got "-v['']\n"

stdout:
-v['']
stderr:
dash2 printf -v %q

stdout:
stderr: 
dash: 3: printf: Illegal option -v
ash2 printf -v %q

stdout:
-v
stderr:
zsh2 printf -v %q

stdout:
-v
stderr:
mksh2 printf -v %q

stdout:
-v
stderr:
printf: warning: ignoring excess arguments, starting with ‘foo’
ksh2 printf -v %q

[ksh stdout] Expected 'OK\n' Got '-v'
[ksh status] Expected 0 Got 1

stdout:
-v
stderr:
printf: warning: ignoring excess arguments, starting with ‘foo’
toysh2 printf -v %q

[toysh stdout] Expected 'OK\n' Got '-v'
[toysh status] Expected 0 Got 1

stdout:
-v
stderr:
sush2 printf -v %q

[sush stdout] Expected 'OK\n' Got ''
[sush status] Expected 0 Got 1

stdout:
stderr: 
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 4: with: command not found
dash3 printf -v a[1]

stdout:
stderr: 
dash: 1: Syntax error: "(" unexpected
ash3 printf -v a[1]

stdout:
stderr: 
ash: syntax error: unexpected "("
zsh3 printf -v a[1]

stdout:
-vstatus=0
['a', 'b', 'c']
stderr:
mksh3 printf -v a[1]

stdout:
-vstatus=0
['a', 'b', 'c']
stderr:
printf: warning: ignoring excess arguments, starting with ‘a[1]’
ksh3 printf -v a[1]

[ksh stdout] Expected "status=0\n['a', 'foo', 'c']\n" Got "-vstatus=0\n['a', 'b', 'c']\n"

stdout:
-vstatus=0
['a', 'b', 'c']
stderr:
printf: warning: ignoring excess arguments, starting with ‘a[1]’
toysh3 printf -v a[1]

[toysh stdout] Expected "status=0\n['a', 'foo', 'c']\n" Got ''
[toysh status] Expected 0 Got 2

stdout:
stderr: 
main: line 1: sh: syntax error: a
ash4 printf -v syntax error

stdout:
-vstatus=0
stderr:
zsh4 printf -v syntax error

stdout:
-vstatus=0
stderr:
mksh4 printf -v syntax error

stdout:
-vstatus=0
stderr:
printf: warning: ignoring excess arguments, starting with ‘a[’
ksh4 printf -v syntax error

[ksh stdout] Expected 'status=2\n' Got '-vstatus=0\n'

stdout:
-vstatus=0
stderr:
printf: warning: ignoring excess arguments, starting with ‘a[’
toysh4 printf -v syntax error

[toysh stdout] Expected 'status=2\n' Got '-vstatus=0\n'

stdout:
-vstatus=0
stderr:
sush4 printf -v syntax error

[sush stdout] Expected 'status=2\n' Got 'status=1\n'

stdout:
status=1
stderr:
brush4 printf -v syntax error

[brush stdout] Expected 'status=2\n' Got 'status=1\n'

stdout:
status=1
stderr:
error: printf: failed to parse parameter 'a['
dash5 dynamic declare instead of %s

stdout:
['']
stderr:
dash: 2: declare: not found
ash5 dynamic declare instead of %s

stdout:
['']
stderr:
ash: declare: not found
mksh5 dynamic declare instead of %s

stdout:
['']
stderr:
mksh: <stdin>[2]: declare: not found
ksh5 dynamic declare instead of %s

[ksh stdout] Expected "['hello there']\n" Got "['']\n"

stdout:
['']
stderr:
E: ksh: <stdin>[2]: declare: inaccessible or not found
brush5 dynamic declare instead of %s

[brush stdout] Expected "['hello there']\n" Got "['']\n"

stdout:
['']
stderr:
declare: foo=hello there: not a valid variable name
dash6 dynamic declare instead of %q

stdout:
stderr: 
dash: 3: Bad substitution
ash6 dynamic declare instead of %q

stdout:
stderr: 
ash: syntax error: bad substitution
zsh6 dynamic declare instead of %q

stdout:
stderr: 
zsh: bad substitution
mksh6 dynamic declare instead of %q

stdout:
stderr: 
mksh: <stdin>[3]: declare: not found
ksh6 dynamic declare instead of %q

[ksh stdout] Expected '\'"quoted" with spaces and \\\'\n' Got '\n'

stdout:
stderr: 
E: ksh: <stdin>[3]: declare: inaccessible or not found
toysh6 dynamic declare instead of %q

[toysh stdout] Expected '\'"quoted" with spaces and \\\'\n' Got '\n'

stdout:
stderr: 
main: line 3: sh: val: @Q}"
sush6 dynamic declare instead of %q

[sush stdout] Expected '\'"quoted" with spaces and \\\'\n' Got '"quoted" with spaces and \\\n'

stdout:
"quoted" with spaces and \
stderr:
brush6 dynamic declare instead of %q

[brush stdout] Expected '\'"quoted" with spaces and \\\'\n' Got '\n'

stdout:
stderr: 
declare: foo='"quoted" with spaces and \': not a valid variable name
osh6 dynamic declare instead of %q

stdout:
$'"quoted" with spaces and \\'
stderr:
dash7 printf -v dynamic scope

stdout:
not implemented
stderr:
ash7 printf -v dynamic scope

stdout:
not implemented
stderr:
zsh7 printf -v dynamic scope

stdout:
not implemented
stderr:
mksh7 printf -v dynamic scope

stdout:
not implemented
stderr:
ksh7 printf -v dynamic scope

[ksh stdout] Expected 'dollar=dollar\n--\ndollar=\\$\nmylocal=mylocal\n--\ndollar=\\$\nmylocal=\n' Got 'dollar=dollar\n--\n-v-vdollar=dollar\nmylocal=foo\n--\ndollar=dollar\nmylocal=\n'

stdout:
dollar=dollar
--
-v-vdollar=dollar
mylocal=foo
--
dollar=dollar
mylocal=
stderr:
printf: warning: ignoring excess arguments, starting with ‘dollar’
printf: warning: ignoring excess arguments, starting with ‘mylocal’
toysh7 printf -v dynamic scope

[toysh stdout] Expected 'dollar=dollar\n--\ndollar=\\$\nmylocal=mylocal\n--\ndollar=\\$\nmylocal=\n' Got ''
[toysh status] Expected 0 Got -6

stdout:
stderr: 
munmap_chunk(): invalid pointer
osh7 printf -v dynamic scope

stdout:
dollar=dollar
--
dollar='$'
mylocal=mylocal
--
dollar='$'
mylocal=
stderr:
sush8 printf with too few arguments

[sush stdout] Expected '-a b-x y--\n' Got '--'

stdout:
--
stderr:
sush9 printf with too many arguments

[sush stdout] Expected '-a-b-\n-c-d-\n-e--\n' Got '--'

stdout:
--
stderr:
sush11 printf integer

[sush stdout] Expected '42\n42\n97\n97\n[ 42]\n[42 ]\n[00042]\n' Got '42\n42\n\'a\n"a\n[ 42]\n[42 ]\n[00042]\n'

stdout:
42
42
'a
"a
[   42]
[42   ]
[00042]
stderr:
toysh12 printf %6.4d -- "precision" does padding for integers

[toysh stdout] Expected '[ 0042]\n[0042]\n[ 42]\n--\n[ -0042]\n[-0042]\n[ -42]\n' Got '[ 0042]\n[0042]\n[ 42]\n\n[ -0042]\n[-0042]\n[ -42]\n'

stdout:
[  0042]
[0042]
[    42]

[ -0042]
[-0042]
[   -42]
stderr:
sush12 printf %6.4d -- "precision" does padding for integers

[sush stdout] Expected '[ 0042]\n[0042]\n[ 42]\n--\n[ -0042]\n[-0042]\n[ -42]\n' Got '[42]\n[42]\n[42]\n--\n[-42]\n[-42]\n[-42]\n'

stdout:
[42]
[42]
[42]
--
[-42]
[-42]
[-42]
stderr:
toysh13 printf %6.4x X o

[toysh stdout] Expected '[ 002a]\n[002a]\n[ 2a]\n--\n[ 002A]\n[002A]\n[ 2A]\n--\n[ 0052]\n[0052]\n[ 52]\n' Got '[ 002a]\n[002a]\n[ 2a]\n\n[ 002A]\n[002A]\n[ 2A]\n\n[ 0052]\n[0052]\n[ 52]\n'

stdout:
[  002a]
[002a]
[    2a]

[  002A]
[002A]
[    2A]

[  0052]
[0052]
[    52]
stderr:
sush13 printf %6.4x X o

[sush stdout] Expected '[ 002a]\n[002a]\n[ 2a]\n--\n[ 002A]\n[002A]\n[ 2A]\n--\n[ 0052]\n[0052]\n[ 52]\n' Got '[2a]\n[2a]\n[2a]\n--\n[2A]\n[2A]\n[2A]\n--\n[52]\n[52]\n[52]\n'

stdout:
[2a]
[2a]
[2a]
--
[2A]
[2A]
[2A]
--
[52]
[52]
[52]
stderr:
toysh14 %06d zero padding vs. %6.6d

[toysh stdout] Expected '[000042]\n[-00042]\n--\n[000042]\n[-000042]\n' Got '[000042]\n[-00042]\n\n[000042]\n[-000042]\n'

stdout:
[000042]
[-00042]

[000042]
[-000042]
stderr:
sush14 %06d zero padding vs. %6.6d

[sush stdout] Expected '[000042]\n[-00042]\n--\n[000042]\n[-000042]\n' Got '[000042]\n[-00042]\n--\n[42]\n[-42]\n'

stdout:
[000042]
[-00042]
--
[42]
[-42]
stderr:
mksh16 %06s is no-op

stdout:
(    42)
(   -42)
((status=1
stderr:
printf: %06s: invalid conversion specification
printf: %06s: invalid conversion specification
ksh16 %06s is no-op

[ksh stdout] Expected '( 42)\n( -42)\n( 42)\n( -42)\nstatus=0\n' Got '( 42)\n( -42)\n((status=1\n'

stdout:
(    42)
(   -42)
((status=1
stderr:
printf: %06s: invalid conversion specification
printf: %06s: invalid conversion specification
brush16 %06s is no-op

[brush stdout] Expected '( 42)\n( -42)\n( 42)\n( -42)\nstatus=0\n' Got '( 42)\n( -42)\nstatus=1\n'

stdout:
(    42)
(   -42)
status=1
stderr:
error: printf: printf: printf parsing error: %06s: invalid conversion specification
error: printf: printf: printf parsing error: %06s: invalid conversion specification
sush17 printf %6.4s does both truncation and padding

[sush stdout] Expected '[ foo]\n[ foo]\n[foo ]\n[spam-eggs]\n[ spam]\n[spam ]\n' Got '[ foo]\n[foo]\n[foo]\n[spam-eggs]\n[spam-eggs]\n[spam-eggs]\n'

stdout:
[   foo]
[foo]
[foo]
[spam-eggs]
[spam-eggs]
[spam-eggs]
stderr:
mksh18 printf %6.0s and %0.0s

stdout:
[      ]
[
stderr:
printf: %0.0s: invalid conversion specification
ksh18 printf %6.0s and %0.0s

[ksh stdout] Expected '[ ]\n[]\n' Got '[ ]\n['
[ksh status] Expected 0 Got 1

stdout:
[      ]
[
stderr:
printf: %0.0s: invalid conversion specification
sush18 printf %6.0s and %0.0s

[sush stdout] Expected '[ ]\n[]\n' Got '[foo]\n[foo]\n'

stdout:
[foo]
[foo]
stderr:
brush18 printf %6.0s and %0.0s

[brush stdout] Expected '[ ]\n[]\n' Got '[ ]\n'
[brush status] Expected 0 Got 1

stdout:
[      ]
stderr:
error: printf: printf: printf parsing error: %0.0s: invalid conversion specification
zsh19 printf %6.s and %0.s

stdout:
[   foo]
[foo]
stderr:
mksh19 printf %6.s and %0.s

stdout:
[      ]
[
stderr:
printf: %0.s: invalid conversion specification
ksh19 printf %6.s and %0.s

[ksh stdout] Expected '[ ]\n[]\n' Got '[ ]\n['
[ksh status] Expected 0 Got 1

stdout:
[      ]
[
stderr:
printf: %0.s: invalid conversion specification
sush19 printf %6.s and %0.s

[sush stdout] Expected '[ ]\n[]\n' Got '[foo]\n[foo]\n'

stdout:
[foo]
[foo]
stderr:
brush19 printf %6.s and %0.s

[brush stdout] Expected '[ ]\n[]\n' Got '[ ]\n'
[brush status] Expected 0 Got 1

stdout:
[      ]
stderr:
error: printf: printf: printf parsing error: %0.s: invalid conversion specification
sush20 printf %*.*s (width/precision from args)

[sush stdout] Expected '[ hello]\n[hel]\n[ hel]\n[ hel]\n[ hel]\n' Got ''
[sush status] Expected 0 Got 1

stdout:
stderr: 
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 1: printf: Other("Error parsing the format string %* 9")
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 2: printf: Other("Error parsing the format string %.* 3")
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 3: printf: Other("Error parsing the format string %* 9")
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 4: printf: Other("Error parsing the format string %9.* 3")
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 5: printf: Other("Error parsing the format string %* 9")
mksh22 unsigned / octal / hex big

stdout:
[1]
[1]
[1]
[1]

[2147483647]
[17777777777]
[7fffffff]
[7FFFFFFF]

stderr:
ksh22 unsigned / octal / hex big

[ksh stdout] Expected '[4294967296]\n[40000000000]\n[100000000]\n[100000000]\n\n[9223372036854775807]\n[777777777777777777777]\n[7fffffffffffffff]\n[7FFFFFFFFFFFFFFF]\n\n' Got '[1]\n[1]\n[1]\n[1]\n\n[2147483647]\n[17777777777]\n[7fffffff]\n[7FFFFFFF]\n\n'

stdout:
[1]
[1]
[1]
[1]

[2147483647]
[17777777777]
[7fffffff]
[7FFFFFFF]

stderr:
ash23 empty string (osh is more strict)

stdout:
0
stderr:
ash: invalid number ''
sush23 empty string (osh is more strict)

[sush stdout] Expected '0\n' Got '\n'

stdout:
stderr: 
osh23 empty string (osh is more strict)

stdout:
stderr: 
  printf '%d\n' ''
                ^
[ stdin ]:1: printf expected an integer, got ''
mksh24 No char after ' => zero code point

stdout:
0
0
stderr:
printf: ‘'’: expected a numeric value
printf: ‘"’: expected a numeric value
ksh24 No char after ' => zero code point

[ksh status] Expected 0 Got 1

stdout:
0
0
stderr:
printf: ‘'’: expected a numeric value
printf: ‘"’: expected a numeric value
sush24 No char after ' => zero code point

[sush stdout] Expected '0\n0\n' Got '\'\n"\n'

stdout:
'
"
stderr:
dash25 Unicode char with '

stdout:
ce
206
316

e4
228
344

stderr:
ash25 Unicode char with '

stdout:
ce
206
316

e4
228
344

stderr:
mksh25 Unicode char with '

stdout:
weird bug
stderr:
toysh25 Unicode char with '

[toysh stdout] Expected '3bc\n956\n1674\n\n4e09\n19977\n47011\n\n' Got ''
[toysh status] Expected 0 Got -6

stdout:
stderr: 
munmap_chunk(): invalid pointer
sush25 Unicode char with '

[sush stdout] Expected '3bc\n956\n1674\n\n4e09\n19977\n47011\n\n' Got "3bc\n'\xce\xbc\n1674\n\n4e09\n'\xe4\xb8\x89\n47011\n\n"

stdout:
3bc
'μ
1674

4e09
'三
47011

stderr:
sush26 Invalid UTF-8

[sush stdout] Expected 'bytes1\nce\n206\n316\n\nbytes2\nbc\n188\n274\n\noverlong2\nc1\n193\n301\n\noverlong3\ne0\n224\n340\n\n' Got "bytes1\n'\n\nbytes2\n'\n\noverlong2\n'\n\noverlong3\n'\n\n"

stdout:
bytes1
'

bytes2
'

overlong2
'

overlong3
'

stderr:
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 4: printf: ArithError("", InvalidNumber("'"))
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 6: printf: ArithError("", InvalidNumber("'"))
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 11: printf: ArithError("", InvalidNumber("'"))
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 13: printf: ArithError("", InvalidNumber("'"))
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 19: printf: ArithError("", InvalidNumber("'"))
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 21: printf: ArithError("", InvalidNumber("'"))
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 26: printf: ArithError("", InvalidNumber("'"))
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 28: printf: ArithError("", InvalidNumber("'"))
brush26 Invalid UTF-8

[brush stdout] Expected 'bytes1\nce\n206\n316\n\nbytes2\nbc\n188\n274\n\noverlong2\nc1\n193\n301\n\noverlong3\ne0\n224\n340\n\n' Got 'bytes1\n0\n0\n0\n\nbytes2\n0\n0\n0\n\noverlong2\n0\n0\n0\n\noverlong3\n0\n0\n0\n\n'

stdout:
bytes1
0
0
0

bytes2
0
0
0

overlong2
0
0
0

overlong3
0
0
0

stderr:
error: i/o error: stream did not contain valid UTF-8
brush: "'": expected a numeric value
brush: "'": expected a numeric value
brush: "'": expected a numeric value
error: i/o error: stream did not contain valid UTF-8
brush: "'": expected a numeric value
brush: "'": expected a numeric value
brush: "'": expected a numeric value
error: i/o error: stream did not contain valid UTF-8
brush: "'": expected a numeric value
brush: "'": expected a numeric value
brush: "'": expected a numeric value
error: i/o error: stream did not contain valid UTF-8
brush: "'": expected a numeric value
brush: "'": expected a numeric value
brush: "'": expected a numeric value
dash27 Too large

stdout:
too large
f4
244
364

stderr:
ash27 Too large

stdout:
too large
f4
244
364

stderr:
mksh27 Too large

stdout:
weird bug
stderr:
toysh27 Too large

[toysh stdout] Expected 'too large\n111111\n1118481\n4210421\n\n' Got ''
[toysh status] Expected 0 Got -6

stdout:
stderr: 
munmap_chunk(): invalid pointer
sush27 Too large

[sush stdout] Expected 'too large\n111111\n1118481\n4210421\n\n' Got "too large\n'\n\n"

stdout:
too large
'

stderr:
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 5: printf: ArithError("", InvalidNumber("'"))
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 7: printf: ArithError("", InvalidNumber("'"))
brush27 Too large

[brush stdout] Expected 'too large\n111111\n1118481\n4210421\n\n' Got 'too large\n0\n0\n0\n\n'

stdout:
too large
0
0
0

stderr:
error: i/o error: stream did not contain valid UTF-8
brush: "'": expected a numeric value
brush: "'": expected a numeric value
brush: "'": expected a numeric value
osh27 Too large

stdout:
too large
f4
244
364

stderr:
  printf '%x\n' \'$too_large
                ^~
[ stdin ]:5: Warning: UTF-8 decode: Integer too large at offset 1 in string of 5 bytes
  printf '%u\n' \'$too_large
                ^~
[ stdin ]:6: Warning: UTF-8 decode: Integer too large at offset 1 in string of 5 bytes
  printf '%o\n' \'$too_large
                ^~
[ stdin ]:7: Warning: UTF-8 decode: Integer too large at offset 1 in string of 5 bytes
osh28 negative numbers with unsigned / octal / hex

stdout:
status=1
status=1
status=1
status=1
stderr:
  [%u]\n
    ^
[ printf arg at line 1 of [ stdin ] ]:1

  printf '[%u]\n' -42
         ^
[ stdin ]:1: Can't format negative number with %u: -42
  [%o]\n
    ^
[ printf arg at line 4 of [ stdin ] ]:1

  printf '[%o]\n' -42
         ^
[ stdin ]:4: Can't format negative number with %o: -42
  [%x]\n
    ^
[ printf arg at line 7 of [ stdin ] ]:1

  printf '[%x]\n' -42
         ^
[ stdin ]:7: Can't format negative number with %x: -42
  [%X]\n
    ^
[ printf arg at line 10 of [ stdin ] ]:1

  printf '[%X]\n' -42
         ^
[ stdin ]:10: Can't format negative number with %X: -42
sush29 printf floating point (not required, but they all implement it)

[sush stdout] Expected '[3.141590]\n[3.14]\n[ 3.14]\n[3.14 ]\n[3.141590]\n[3.140000]\n' Got '[3.141590]\n[3.141590]\n[3.141590]\n[3.141590]\n[3.141590]\n[3.140000]\n'

stdout:
[3.141590]
[3.141590]
[3.141590]
[3.141590]
[3.141590]
[3.140000]
stderr:
osh29 printf floating point (not required, but they all implement it)

stdout:
stderr: 
  [%f]\n
    ^
[ printf arg at line 1 of [ stdin ] ]:1

  printf '[%f]\n' 3.14159
         ^
[ stdin ]:1: osh printf doesn't support floating point
  [%.2f]\n
      ^
[ printf arg at line 2 of [ stdin ] ]:1

  printf '[%.2f]\n' 3.14159
         ^
[ stdin ]:2: osh printf doesn't support floating point
  [%8.2f]\n
       ^
[ printf arg 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 arg at line 4 of [ stdin ] ]:1

  printf '[%-8.2f]\n' 3.14159
         ^
[ stdin ]:4: osh printf doesn't support floating point
  [%-f]\n
     ^
[ printf arg at line 5 of [ stdin ] ]:1

  printf '[%-f]\n' 3.14159
         ^
[ stdin ]:5: osh printf doesn't support floating point
  [%-f]\n
     ^
[ printf arg at line 6 of [ stdin ] ]:1

  printf '[%-f]\n' 3.14
         ^
[ stdin ]:6: osh printf doesn't support floating point
sush30 printf floating point with - and 0

[sush stdout] Expected '[ 3.1400]\n[003.1400]\n[ 3.1400]\n[003.1400]\n---\n[3.1400 ]\n[3.1400 ]\n[3.1400 ]\n[3.1400 ]\n' Got '[3.140000]\n[3.140000]\n[3.140000]\n[3.140000]\n---\n[3.140000]\n[3.140000]\n[3.140000]\n[3.140000]\n'

stdout:
[3.140000]
[3.140000]
[3.140000]
[3.140000]
---
[3.140000]
[3.140000]
[3.140000]
[3.140000]
stderr:
osh30 printf floating point with - and 0

stdout:
---
stderr:
  [%8.4f]\n
       ^
[ printf arg 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 arg 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 arg 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 arg at line 4 of [ stdin ] ]:1

  printf '[%08.04f]\n' 3.14
         ^
[ stdin ]:4: Expected a printf format character
  [%-8.4f]\n
        ^
[ printf arg 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 arg 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 arg at line 8 of [ stdin ] ]:1

  printf '[%-8.04f]\n' 3.14
         ^
[ stdin ]:8: Expected a printf format character
  [%-08.04f]\n
         ^
[ printf arg at line 9 of [ stdin ] ]:1

  printf '[%-08.04f]\n' 3.14
         ^
[ stdin ]:9: Expected a printf format character
sush31 printf eE fF gG

[sush stdout] Expected '[3.140000e+00]\n[3.140000E+00]\n[3.140000]\n[3.14]\n[3.14]\n' Got '[3.140000]\n'
[sush status] Expected 0 Got 1

stdout:
[3.140000]
stderr:
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 1: printf: Other("Incorrect type passed as an argument %e 3.14")
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 2: printf: Other("Incorrect type passed as an argument %E 3.14")
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 4: printf: Other("Incorrect type passed as an argument %g 3.14")
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 5: printf: Other("Incorrect type passed as an argument %G 3.14")
osh31 printf eE fF gG

stdout:
stderr: 
  [%e]\n
    ^
[ printf arg at line 1 of [ stdin ] ]:1

  printf '[%e]\n' 3.14
         ^
[ stdin ]:1: osh printf doesn't support floating point
  [%E]\n
    ^
[ printf arg at line 2 of [ stdin ] ]:1

  printf '[%E]\n' 3.14
         ^
[ stdin ]:2: osh printf doesn't support floating point
  [%f]\n
    ^
[ printf arg at line 3 of [ stdin ] ]:1

  printf '[%f]\n' 3.14
         ^
[ stdin ]:3: osh printf doesn't support floating point
  [%g]\n
    ^
[ printf arg at line 4 of [ stdin ] ]:1

  printf '[%g]\n' 3.14
         ^
[ stdin ]:4: osh printf doesn't support floating point
  [%G]\n
    ^
[ printf arg at line 5 of [ stdin ] ]:1

  printf '[%G]\n' 3.14
         ^
[ stdin ]:5: osh printf doesn't support floating point
dash32 printf backslash escapes

stdout:
['a\tb']
['\\xE2\\x98\\xA0']
['$e']
['\x1f7']
stderr:
sush32 printf backslash escapes

[sush stdout] Expected "['a\\tb']\n['\\xe2\\x98\\xa0']\n['$e']\n['\\x1f7']\n" Got "['a\\tb']\n['\\\\xE2\\\\x98\\\\xA0']\n['\\\\044e']\n['\\\\0377']\n"

stdout:
['a\tb']
['\\xE2\\x98\\xA0']
['\\044e']
['\\0377']
stderr:
sush33 printf octal backslash escapes

[sush stdout] Expected "['\\x1f7']\n['\\xff']\n" Got "['\\\\0377']\n['\\\\377']\n"

stdout:
['\\0377']
['\\377']
stderr:
brush33 printf octal backslash escapes

[brush stdout] Expected "['\\x1f7']\n['\\xff']\n" Got "['\\x1f7']\n"
[brush status] Expected 0 Got 1

stdout:
['\x1f7']
stderr:
error: i/o error: stream did not contain valid UTF-8
dash34 printf unicode backslash escapes

stdout:
['\\u2620']
['\\U0000065f']
stderr:
ash34 printf unicode backslash escapes

stdout:
['\\u2620']
['\\U0000065f']
stderr:
toysh34 printf unicode backslash escapes

[toysh stdout] Expected "['\\xe2\\x98\\xa0']\n['\\xd9\\x9f']\n" Got "['\\\\u2620']\n['\\\\U0000065f']\n"

stdout:
['\\u2620']
['\\U0000065f']
stderr:
sush34 printf unicode backslash escapes

[sush stdout] Expected "['\\xe2\\x98\\xa0']\n['\\xd9\\x9f']\n" Got "['\\\\u2620']\n['\\\\U0000065f']\n"

stdout:
['\\u2620']
['\\U0000065f']
stderr:
sush36 printf % escapes

[sush stdout] Expected '[%]\n' Got ''
[sush status] Expected 0 Got 1

stdout:
stderr: 
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 1: printf: Other("Too many arguments passed %% ")
sush37 printf %c ASCII

[sush stdout] Expected 'a\nA\nAZ\n' Got ''
[sush status] Expected 0 Got 1

stdout:
stderr: 
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 1: printf: Other("Incorrect type passed as an argument %c a")
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 2: printf: Other("Incorrect type passed as an argument %c ABC")
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 3: printf: Other("Incorrect type passed as an argument %c ABC")
dash38 printf %c unicode - prints the first BYTE of a string - it does not respect UTF-8

stdout:
stderr: 
ash38 printf %c unicode - prints the first BYTE of a string - it does not respect UTF-8

stdout:
stderr: 
toysh38 printf %c unicode - prints the first BYTE of a string - it does not respect UTF-8

[toysh stdout] Expected '[\xce\xbc\xce\xbc]\n ce\n' Got ''
[toysh status] Expected 0 Got -6

stdout:
stderr: 
munmap_chunk(): invalid pointer
sush38 printf %c unicode - prints the first BYTE of a string - it does not respect UTF-8

[sush stdout] Expected '[\xce\xbc\xce\xbc]\n ce\n' Got '[\xce\xbc\xce\xbc]\n'

stdout:
[μμ]
stderr:
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 9: printf: Other("Incorrect type passed as an argument %c μμ")
dash39 printf invalid format

stdout:
status=2
status=2
stderr:
dash: 1: printf: %z: invalid directive
dash: 3: printf: %-z: invalid directive
osh39 printf invalid format

stdout:
status=2
status=2
stderr:
  %z
   ^
[ printf arg at line 1 of [ stdin ] ]:1

  printf '%z' 42
         ^
[ stdin ]:1: Invalid printf format character
  %-z
    ^
[ printf arg at line 3 of [ stdin ] ]:1

  printf '%-z' 42
         ^
[ stdin ]:3: Invalid printf format character
bash40 printf %q

stdout:
[a\ b]
stderr:
dash40 printf %q

stdout:
[
stderr:
dash: 2: printf: %q: invalid directive
ash40 printf %q

stdout:
[
stderr:
ash: %q]\n: invalid format
zsh40 printf %q

stdout:
[a\ b]
stderr:
toysh40 printf %q

[toysh stdout] Expected "['a b']\n" Got '['
[toysh status] Expected 0 Got 1

stdout:
[
stderr:
printf: bad %q@3
sush40 printf %q

[sush stdout] Expected "['a b']\n" Got '[a b]\n'

stdout:
[a b]
stderr:
bash41 printf %6q (width)

stdout:
[  a\ b]
[a\ b]
stderr:
dash41 printf %6q (width)

stdout:
[[
stderr:
dash: 2: printf: %6q: invalid directive
dash: 3: printf: %1q: invalid directive
ash41 printf %6q (width)

stdout:
[[
stderr:
ash: %6q]\n: invalid format
ash: %1q]\n: invalid format
zsh41 printf %6q (width)

stdout:
[  a\ b]
[a\ b]
stderr:
mksh41 printf %6q (width)

stdout:
[[
stderr:
printf: %6q: invalid conversion specification
printf: %1q: invalid conversion specification
ksh41 printf %6q (width)

[ksh stdout] Expected "[ 'a b']\n['a b']\n" Got '[['
[ksh status] Expected 0 Got 1

stdout:
[[
stderr:
printf: %6q: invalid conversion specification
printf: %1q: invalid conversion specification
toysh41 printf %6q (width)

[toysh stdout] Expected "[ 'a b']\n['a b']\n" Got '[['
[toysh status] Expected 0 Got 1

stdout:
[[
stderr:
printf: bad %q@4
printf: bad %q@4
sush41 printf %6q (width)

[sush stdout] Expected "[ 'a b']\n['a b']\n" Got '[a b]\n[a b]\n'

stdout:
[a b]
[a b]
stderr:
brush41 printf %6q (width)

[brush stdout] Expected "[ 'a b']\n['a b']\n" Got ''
[brush status] Expected 0 Got 1

stdout:
stderr: 
error: printf: printf: printf parsing error: %6q: invalid conversion specification
error: printf: printf: printf parsing error: %1q: invalid conversion specification
ash42 printf negative numbers

stdout:
[-42] status=0
[-42] status=0
[-42] status=0
[-42] status=0
[0] status=1
[0] status=1
[0] status=1
[0] status=1
stderr:
ash: invalid number '-42 '
ash: invalid number '-42 '
ash: invalid number '-42z'
ash: invalid number '-42z'
zsh42 printf negative numbers

stdout:
[-42] status=0
[-42] status=0
[-42] status=0
[-42] status=0
[-42] status=0
[-42] status=0
[0] status=1
[0] status=1
stderr:
zsh: bad math expression: operator expected at `z'
zsh: bad math expression: operator expected at `z'
sush42 printf negative numbers

[sush stdout] Expected '[-42] status=0\n[-42] status=0\n[-42] status=0\n[-42] status=0\n[-42] status=1\n[-42] status=1\n[-42] status=1\n[-42] status=1\n' Got '[-42] status=0\n[-42] status=0\n[ -42] status=0\n[ -42] status=0\n[ -42 ] status=0\n[ -42 ] status=0\n[ -42z] status=0\n[ -42z] status=0\n'

stdout:
[-42] status=0
[-42] status=0
[ -42] status=0
[ -42] status=0
[ -42 ] status=0
[ -42 ] status=0
[ -42z] status=0
[ -42z] status=0
stderr:
brush42 printf negative numbers

[brush stdout] Expected '[-42] status=0\n[-42] status=0\n[-42] status=0\n[-42] status=0\n[-42] status=1\n[-42] status=1\n[-42] status=1\n[-42] status=1\n' Got '[-42] status=0\n[-42] status=0\n[-42] status=0\n[-42] status=0\n[-42] status=0\n[-42] status=0\n[-42] status=0\n[-42] status=0\n'

stdout:
[-42] status=0
[-42] status=0
[-42] status=0
[-42] status=0
[-42] status=0
[-42] status=0
[-42] status=0
[-42] status=0
stderr:
brush: '\ -42\ ': value not completely converted
brush: '\ -42\ ': value not completely converted
brush: '\ -42z': value not completely converted
brush: '\ -42z': value not completely converted
osh42 printf negative numbers

[osh stdout] Expected '[-42] status=0\n[-42] status=0\n[-42] status=0\n[-42] status=0\n[-42] status=0\n[-42] status=0\nstatus=1\nstatus=1\n' Got '[-42] status=0\n[-42] status=0\n[-42] status=0\n[-42] status=0\nstatus=1\nstatus=1\nstatus=1\nstatus=1\n'

stdout:
[-42] status=0
[-42] status=0
[-42] status=0
[-42] status=0
status=1
status=1
status=1
status=1
stderr:
  printf '[%d] ' ' -42 '
                 ^
[ stdin ]:11: printf expected an integer, got ' -42 '
  printf '[%i] ' ' -42 '
                 ^
[ stdin ]:13: printf expected an integer, got ' -42 '
  printf '[%d] ' ' -42z'
                 ^
[ stdin ]:16: printf expected an integer, got ' -42z'
  printf '[%i] ' ' -42z'
                 ^
[ stdin ]:18: printf expected an integer, got ' -42z'
sush43 printf + and space flags

[sush stdout] Expected '[+42]\n[-42]\n[ 42]\n[-42]\n' Got ''
[sush status] Expected 0 Got 1

stdout:
stderr: 
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 1: printf: Other("Error parsing the format string %+ 42")
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 2: printf: Other("Error parsing the format string %+ -42")
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 3: printf: Other("Error parsing the format string %  42")
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 4: printf: Other("Error parsing the format string %  -42")
osh43 printf + and space flags

stdout:
stderr: 
  [%+d]\n
    ^
[ printf arg at line 1 of [ stdin ] ]:1

  printf '[%+d]\n' 42
         ^
[ stdin ]:1: osh printf doesn't support the '+' flag
  [%+d]\n
    ^
[ printf arg at line 2 of [ stdin ] ]:1

  printf '[%+d]\n' -42
         ^
[ stdin ]:2: osh printf doesn't support the '+' flag
  [% d]\n
    ^
[ printf arg at line 3 of [ stdin ] ]:1

  printf '[% d]\n' 42
         ^
[ stdin ]:3: osh printf doesn't support the ' ' flag
  [% d]\n
    ^
[ printf arg at line 4 of [ stdin ] ]:1

  printf '[% d]\n' -42
         ^
[ stdin ]:4: osh printf doesn't support the ' ' flag
sush44 printf # flag

[sush stdout] Expected '[0][052]\n[0][0x2a]\n[0][0X2A]\n---\n[3][3.]\n[3][3.00000]\n' Got '[00][052]\n[0x0][0x2a]\n[0X0][0X2A]\n---\n[3.000000][3.000000]\n'
[sush status] Expected 0 Got 1

stdout:
[00][052]
[0x0][0x2a]
[0X0][0X2A]
---
[3.000000][3.000000]
stderr:
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 6: printf: Other("Incorrect type passed as an argument %g 3")
osh44 printf # flag

stdout:
---
stderr:
  [%#o][%#o]\n
    ^
[ printf arg 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 arg 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 arg 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 arg 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 arg at line 6 of [ stdin ] ]:1

  printf '[%g][%#g]\n' 3 3
         ^
[ stdin ]:6: osh printf doesn't support floating point
ash45 Runtime error for invalid integer

stdout:
0
status=1
0
status=1
stderr:
ash: invalid number '3abc'
ash: invalid number 'xyz'
zsh45 Runtime error for invalid integer

stdout:
0
status=1
0
status=0
stderr:
zsh: bad math expression: operator expected at `abc'
sush45 Runtime error for invalid integer

[sush stdout] Expected '3\nstatus=1\n0\nstatus=1\n' Got '3abc\nstatus=0\nxyz\nstatus=0\n'

stdout:
3abc
status=0
xyz
status=0
stderr:
brush45 Runtime error for invalid integer

[brush stdout] Expected '3\nstatus=1\n0\nstatus=1\n' Got '3\nstatus=0\n0\nstatus=0\n'

stdout:
3
status=0
0
status=0
stderr:
brush: '3abc': value not completely converted
brush: 'xyz': expected a numeric value
osh45 Runtime error for invalid integer

stdout:
status=1
status=1
stderr:
  printf '%d\n' $x
                ^~
[ stdin ]:2: printf expected an integer, got '3abc'
  printf '%d\n' xyz
                ^~~
[ stdin ]:4: printf expected an integer, got 'xyz'
dash46 %(strftime format)T

stdout:
status=2
stderr:
dash: 2: printf: %(: invalid directive
dash: 4: printf: %(: invalid directive
ash46 %(strftime format)T

stdout:
status=1
stderr:
ash: %(%Y-%m-%d)T\n: invalid format
ash: %(%Y-%m-%d)T\n: invalid format
zsh46 %(strftime format)T

stdout:
status=1
stderr:
printf: %(: invalid directive
printf: %(: invalid directive
mksh46 %(strftime format)T

stdout:
status=1
stderr:
printf: %(: invalid conversion specification
printf: %(: invalid conversion specification
ksh46 %(strftime format)T

[ksh stdout] Expected '2019-05-16\n2019-05-15\nstatus=0\n' Got 'status=1\n'

stdout:
status=1
stderr:
printf: %(: invalid conversion specification
printf: %(: invalid conversion specification
toysh46 %(strftime format)T

[toysh stdout] Expected '2019-05-16\n2019-05-15\nstatus=0\n' Got 'status=1\n'

stdout:
status=1
stderr:
printf: bad %(@2
printf: bad %(@2
sush46 %(strftime format)T

[sush stdout] Expected '2019-05-16\n2019-05-15\nstatus=0\n' Got 'status=1\n'

stdout:
status=1
stderr:
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 2: printf: Other("Error parsing the format string %( 1557978599")
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 4: printf: Other("Error parsing the format string %( 1557978599")
brush46 %(strftime format)T

[brush stdout] Expected '2019-05-16\n2019-05-15\nstatus=0\n' Got 'status=1\n'

stdout:
status=1
stderr:
error: printf: printf: printf parsing error: %(: invalid conversion specification
error: printf: printf: printf parsing error: %(: invalid conversion specification
dash47 %(strftime format)T doesn't respect TZ if not exported

stdout:
stderr: 
dash: 2: printf: %(: invalid directive
dash: 5: printf: %(: invalid directive
ash47 %(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
zsh47 %(strftime format)T doesn't respect TZ if not exported

stdout:
stderr: 
printf: %(: invalid directive
printf: %(: invalid directive
mksh47 %(strftime format)T doesn't respect TZ if not exported

stdout:
stderr: 
printf: %(: invalid conversion specification
printf: %(: invalid conversion specification
ksh47 %(strftime format)T doesn't respect TZ if not exported

[ksh stdout] Expected 'not equal\n' Got ''

stdout:
stderr: 
printf: %(: invalid conversion specification
printf: %(: invalid conversion specification
toysh47 %(strftime format)T doesn't respect TZ if not exported

[toysh stdout] Expected 'not equal\n' Got ''

stdout:
stderr: 
printf: bad %(@2
printf: bad %(@2
sush47 %(strftime format)T doesn't respect TZ if not exported

[sush stdout] Expected 'not equal\n' Got ''

stdout:
stderr: 
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 2: printf: Other("Error parsing the format string %( 1557978599")
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 5: printf: Other("Error parsing the format string %( 1557978599")
brush47 %(strftime format)T doesn't respect TZ if not exported

[brush stdout] Expected 'not equal\n' Got ''

stdout:
stderr: 
error: printf: printf: printf parsing error: %(: invalid conversion specification
error: printf: printf: printf parsing error: %(: invalid conversion specification
dash48 %(strftime format)T TZ in environ but not in shell's memory

stdout:
stderr: 
dash: 2: printf: %(: invalid directive
dash: 6: printf: %(: invalid directive
ash48 %(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
zsh48 %(strftime format)T TZ in environ but not in shell's memory

stdout:
stderr: 
printf: %(: invalid directive
printf: %(: invalid directive
mksh48 %(strftime format)T TZ in environ but not in shell's memory

stdout:
stderr: 
printf: %(: invalid conversion specification
printf: %(: invalid conversion specification
ksh48 %(strftime format)T TZ in environ but not in shell's memory

[ksh stdout] Expected 'not equal\n' Got ''

stdout:
stderr: 
printf: %(: invalid conversion specification
printf: %(: invalid conversion specification
toysh48 %(strftime format)T TZ in environ but not in shell's memory

[toysh stdout] Expected 'not equal\n' Got ''

stdout:
stderr: 
printf: bad %(@2
printf: bad %(@2
sush48 %(strftime format)T TZ in environ but not in shell's memory

[sush stdout] Expected 'not equal\n' Got ''

stdout:
stderr: 
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 2: printf: Other("Error parsing the format string %( 1557978599")
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 6: printf: Other("Error parsing the format string %( 1557978599")
brush48 %(strftime format)T TZ in environ but not in shell's memory

[brush stdout] Expected 'not equal\n' Got ''

stdout:
stderr: 
error: printf: printf: printf parsing error: %(: invalid conversion specification
error: printf: printf: printf parsing error: %(: invalid conversion specification
dash49 %10.5(strftime format)T

stdout:
[[status=2
stderr:
dash: 2: printf: %10.5(: invalid directive
dash: 4: printf: %10.5(: invalid directive
ash49 %10.5(strftime format)T

stdout:
[[status=1
stderr:
ash: %10.5(%Y-%m-%d)T]\n: invalid format
ash: %10.5(%Y-%m-%d)T]\n: invalid format
zsh49 %10.5(strftime format)T

stdout:
[[status=1
stderr:
printf: %10.5(: invalid directive
printf: %10.5(: invalid directive
mksh49 %10.5(strftime format)T

stdout:
[[status=1
stderr:
printf: %10.5(: invalid conversion specification
printf: %10.5(: invalid conversion specification
ksh49 %10.5(strftime format)T

[ksh stdout] Expected '[ 2019-]\n[ 2019-]\nstatus=0\n' Got '[[status=1\n'

stdout:
[[status=1
stderr:
printf: %10.5(: invalid conversion specification
printf: %10.5(: invalid conversion specification
toysh49 %10.5(strftime format)T

[toysh stdout] Expected '[ 2019-]\n[ 2019-]\nstatus=0\n' Got '[[status=1\n'

stdout:
[[status=1
stderr:
printf: bad %(@7
printf: bad %(@7
sush49 %10.5(strftime format)T

[sush stdout] Expected '[ 2019-]\n[ 2019-]\nstatus=0\n' Got 'status=1\n'

stdout:
status=1
stderr:
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 2: printf: Other("Error parsing the format string %10.5( 1557978599")
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 4: printf: Other("Error parsing the format string %10.5( 1557978599")
brush49 %10.5(strftime format)T

[brush stdout] Expected '[ 2019-]\n[ 2019-]\nstatus=0\n' Got 'status=1\n'

stdout:
status=1
stderr:
error: printf: printf: printf parsing error: %10.5(: invalid conversion specification
error: printf: printf: printf parsing error: %10.5(: invalid conversion specification
dash51 bash truncates long strftime string at 128

stdout:
stderr: 
ash51 bash truncates long strftime string at 128

stdout:
stderr: 
zsh51 bash truncates long strftime string at 128

stdout:
stderr: 
mksh51 bash truncates long strftime string at 128

stdout:
stderr: 
ksh51 bash truncates long strftime string at 128

[ksh stdout] Expected '4\n40\n120\n124\n0\n' Got '0\n0\n0\n0\n0\n'

stdout:
0
0
0
0
0
stderr:
printf: %(: invalid conversion specification
printf: %(: invalid conversion specification
printf: %(: invalid conversion specification
printf: %(: invalid conversion specification
printf: %(: invalid conversion specification
toysh51 bash truncates long strftime string at 128

[toysh stdout] Expected '4\n40\n120\n124\n0\n' Got ''
[toysh status] Expected 0 Got -6

stdout:
stderr: 
munmap_chunk(): invalid pointer
sush51 bash truncates long strftime string at 128

[sush stdout] Expected '4\n40\n120\n124\n0\n' Got '%()T0\n0\n0\n0\n0\n'

stdout:
%()T0
0
0
0
0
stderr:
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 4: syntax error near unexpected token: ()
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 4: local: can only be used in a function
seq: missing operand
Try 'seq --help' for more information.
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 13: syntax error near unexpected token: }

/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 14: strftime-format: command not found
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 14: printf: usage: printf [-v var] format [arguments]
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 15: strftime-format: command not found
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 15: printf: usage: printf [-v var] format [arguments]
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 16: strftime-format: command not found
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 16: printf: usage: printf [-v var] format [arguments]
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 17: strftime-format: command not found
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 17: printf: usage: printf [-v var] format [arguments]
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 18: strftime-format: command not found
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 18: printf: usage: printf [-v var] format [arguments]
brush51 bash truncates long strftime string at 128

[brush stdout] Expected '4\n40\n120\n124\n0\n' Got '0\n0\n0\n0\n0\n'

stdout:
0
0
0
0
0
stderr:
error: printf: printf: printf parsing error: %(: invalid conversion specification
error: printf: printf: printf parsing error: %(: invalid conversion specification
error: printf: printf: printf parsing error: %(: invalid conversion specification
error: printf: printf: printf parsing error: %(: invalid conversion specification
error: printf: printf: printf parsing error: %(: invalid conversion specification
osh51 bash truncates long strftime string at 128

stdout:
4
40
120
124
128
stderr:
bash52 printf positive integer overflow

stdout:
18446744073709551615
status=0
18446744073709551615
status=0

9223372036854775807
status=0
9223372036854775807
status=0

stderr:
bash: line 4: printf: warning: 18446744073709551616: Numerical result out of range
bash: line 2: printf: warning: 18446744073709551615: Numerical result out of range
bash: line 4: printf: warning: 18446744073709551616: Numerical result out of range
dash52 printf positive integer overflow

stdout:
18446744073709551615
status=0
18446744073709551615
status=1

9223372036854775807
status=1
9223372036854775807
status=1

stderr:
dash: 4: printf: 18446744073709551616: Numerical result out of range
dash: 2: printf: 18446744073709551615: Numerical result out of range
dash: 4: printf: 18446744073709551616: Numerical result out of range
ash52 printf positive integer overflow

stdout:
18446744073709551615
status=0
0
status=1

0
status=1
0
status=1

stderr:
ash: invalid number '18446744073709551616'
ash: invalid number '18446744073709551615'
ash: invalid number '18446744073709551616'
zsh52 printf positive integer overflow

stdout:
1844674407370955161
status=0
1844674407370955161
status=0

1844674407370955161
status=0
1844674407370955161
status=0

stderr:
zsh: number truncated after 19 digits: 18446744073709551615
zsh: number truncated after 19 digits: 18446744073709551616
zsh: number truncated after 19 digits: 18446744073709551615
zsh: number truncated after 19 digits: 18446744073709551616
mksh52 printf positive integer overflow

stdout:
18446744073709551615
status=0
18446744073709551615
status=1

9223372036854775807
status=1
9223372036854775807
status=1

stderr:
printf: ‘18446744073709551616’: Numerical result out of range
printf: ‘18446744073709551615’: Numerical result out of range
printf: ‘18446744073709551616’: Numerical result out of range
ksh52 printf positive integer overflow

[ksh stdout] Expected 'status=1\nstatus=1\n\nstatus=1\nstatus=1\n\n' Got '18446744073709551615\nstatus=0\n18446744073709551615\nstatus=1\n\n9223372036854775807\nstatus=1\n9223372036854775807\nstatus=1\n\n'

stdout:
18446744073709551615
status=0
18446744073709551615
status=1

9223372036854775807
status=1
9223372036854775807
status=1

stderr:
printf: ‘18446744073709551616’: Numerical result out of range
printf: ‘18446744073709551615’: Numerical result out of range
printf: ‘18446744073709551616’: Numerical result out of range
toysh52 printf positive integer overflow

[toysh stdout] Expected 'status=1\nstatus=1\n\nstatus=1\nstatus=1\n\n' Got '9223372036854775807\nstatus=1\n9223372036854775807\nstatus=1\n\n9223372036854775807\nstatus=1\n9223372036854775807\nstatus=1\n\n'

stdout:
9223372036854775807
status=1
9223372036854775807
status=1

9223372036854775807
status=1
9223372036854775807
status=1

stderr:
printf: bad %u 18446744073709551615: Numerical result out of range
printf: bad %u 18446744073709551616: Numerical result out of range
printf: bad %d 18446744073709551615: Numerical result out of range
printf: bad %d 18446744073709551616: Numerical result out of range
sush52 printf positive integer overflow

[sush stdout] Expected 'status=1\nstatus=1\n\nstatus=1\nstatus=1\n\n' Got '18446744073709551615\nstatus=0\n18446744073709551616\nstatus=0\n\n18446744073709551615\nstatus=0\n18446744073709551616\nstatus=0\n\n'

stdout:
18446744073709551615
status=0
18446744073709551616
status=0

18446744073709551615
status=0
18446744073709551616
status=0

stderr:
brush52 printf positive integer overflow

[brush stdout] Expected 'status=1\nstatus=1\n\nstatus=1\nstatus=1\n\n' Got '18446744073709551615\nstatus=0\n18446744073709551615\nstatus=0\n\n9223372036854775807\nstatus=0\n9223372036854775807\nstatus=0\n\n'

stdout:
18446744073709551615
status=0
18446744073709551615
status=0

9223372036854775807
status=0
9223372036854775807
status=0

stderr:
brush: '18446744073709551616': Numerical result out of range
brush: '18446744073709551615': Numerical result out of range
brush: '18446744073709551616': Numerical result out of range
bash53 printf negative integer overflow

stdout:
1
status=0
18446744073709551615
status=0

-9223372036854775808
status=0
-9223372036854775808
status=0

stderr:
bash: line 5: printf: warning: -18446744073709551616: Numerical result out of range
bash: line 3: printf: warning: -18446744073709551615: Numerical result out of range
bash: line 5: printf: warning: -18446744073709551616: Numerical result out of range
dash53 printf negative integer overflow

stdout:
1
status=0
18446744073709551615
status=1

-9223372036854775808
status=1
-9223372036854775808
status=1

stderr:
dash: 5: printf: -18446744073709551616: Numerical result out of range
dash: 3: printf: -18446744073709551615: Numerical result out of range
dash: 5: printf: -18446744073709551616: Numerical result out of range
ash53 printf negative integer overflow

stdout:
0
status=1
0
status=1

0
status=1
0
status=1

stderr:
ash: invalid number '-18446744073709551615'
ash: invalid number '-18446744073709551616'
ash: invalid number '-18446744073709551615'
ash: invalid number '-18446744073709551616'
zsh53 printf negative integer overflow

stdout:
16602069666338596455
status=0
16602069666338596455
status=0

-1844674407370955161
status=0
-1844674407370955161
status=0

stderr:
zsh: number truncated after 19 digits: 18446744073709551615
zsh: number truncated after 19 digits: 18446744073709551616
zsh: number truncated after 19 digits: 18446744073709551615
zsh: number truncated after 19 digits: 18446744073709551616
mksh53 printf negative integer overflow

stdout:
1
status=0
18446744073709551615
status=1

-9223372036854775808
status=1
-9223372036854775808
status=1

stderr:
printf: ‘-18446744073709551616’: Numerical result out of range
printf: ‘-18446744073709551615’: Numerical result out of range
printf: ‘-18446744073709551616’: Numerical result out of range
ksh53 printf negative integer overflow

[ksh stdout] Expected 'status=1\nstatus=1\n\nstatus=1\nstatus=1\n\n' Got '1\nstatus=0\n18446744073709551615\nstatus=1\n\n-9223372036854775808\nstatus=1\n-9223372036854775808\nstatus=1\n\n'

stdout:
1
status=0
18446744073709551615
status=1

-9223372036854775808
status=1
-9223372036854775808
status=1

stderr:
printf: ‘-18446744073709551616’: Numerical result out of range
printf: ‘-18446744073709551615’: Numerical result out of range
printf: ‘-18446744073709551616’: Numerical result out of range
toysh53 printf negative integer overflow

[toysh stdout] Expected 'status=1\nstatus=1\n\nstatus=1\nstatus=1\n\n' Got '9223372036854775808\nstatus=1\n9223372036854775808\nstatus=1\n\n-9223372036854775808\nstatus=1\n-9223372036854775808\nstatus=1\n\n'

stdout:
9223372036854775808
status=1
9223372036854775808
status=1

-9223372036854775808
status=1
-9223372036854775808
status=1

stderr:
printf: bad %u -18446744073709551615: Numerical result out of range
printf: bad %u -18446744073709551616: Numerical result out of range
printf: bad %d -18446744073709551615: Numerical result out of range
printf: bad %d -18446744073709551616: Numerical result out of range
sush53 printf negative integer overflow

[sush stdout] Expected 'status=1\nstatus=1\n\nstatus=1\nstatus=1\n\n' Got '1\nstatus=0\nstatus=1\n\n-18446744073709551615\nstatus=0\n-18446744073709551616\nstatus=0\n\n'

stdout:
1
status=0
status=1

-18446744073709551615
status=0
-18446744073709551616
status=0

stderr:
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 5: printf: ParseIntError("number too large to fit in target type")
brush53 printf negative integer overflow

[brush stdout] Expected 'status=1\nstatus=1\n\nstatus=1\nstatus=1\n\n' Got '1\nstatus=0\n18446744073709551615\nstatus=0\n\n-9223372036854775808\nstatus=0\n-9223372036854775808\nstatus=0\n\n'

stdout:
1
status=0
18446744073709551615
status=0

-9223372036854775808
status=0
-9223372036854775808
status=0

stderr:
brush: '-18446744073709551616': Numerical result out of range
brush: '-18446744073709551615': Numerical result out of range
brush: '-18446744073709551616': Numerical result out of range
dash54 printf %b does backslash escaping

stdout:
[\044]
[$]

[\x7e]
[\x7e]

[\A]
[\A]
stderr:
sush54 printf %b does backslash escaping

[sush stdout] Expected '[\\044]\n[$]\n\n[\\x7e]\n[~]\n\n[\\A]\n[\\A]\n' Got '[\\044]\n[\\044]\n\n[\\x7e]\n[\\x7e]\n\n[\\A]\n[\\A]\n'

stdout:
[\044]
[\044]

[\x7e]
[\x7e]

[\A]
[\A]
stderr:
dash55 printf %b unicode escapes

stdout:
[\u03bc]
[\u03bc]
stderr:
ash55 printf %b unicode escapes

stdout:
[\u03bc]
[\u03bc]
stderr:
toysh55 printf %b unicode escapes

[toysh stdout] Expected '[\\u03bc]\n[\xce\xbc]\n' Got '[\\u03bc]\n[\\u03bc]\n'

stdout:
[\u03bc]
[\u03bc]
stderr:
sush55 printf %b unicode escapes

[sush stdout] Expected '[\\u03bc]\n[\xce\xbc]\n' Got '[\\u03bc]\n[\\u03bc]\n'

stdout:
[\u03bc]
[\u03bc]
stderr:
sush56 printf %b respects \c early return

[sush stdout] Expected '[ab\ncd0\n' Got '[ab\ncd\\cxy]\n0\n'

stdout:
[ab
cd\cxy]
0
stderr:
brush56 printf %b respects \c early return

[brush stdout] Expected '[ab\ncd0\n' Got '[ab\ncd]\n0\n'

stdout:
[ab
cd]
0
stderr:
zsh57 printf %b supports octal escapes, both \141 and \0141

stdout:
three \141
four  a

\1419
a9
stderr:
sush57 printf %b supports octal escapes, both \141 and \0141

[sush stdout] Expected 'three a\nfour a\n\na9\na9\n' Got 'three \\141\nfour \\0141\n\n\\1419\n\\01419\n'

stdout:
three \141
four  \0141

\1419
\01419
stderr:
zsh58 printf %b with truncated octal escapes

stdout:
\558
-8

 5c 37
 07
 07
 07
stderr:
sush58 printf %b with truncated octal escapes

[sush stdout] Expected '-8\n-8\n\n 07\n 07\n 07\n 07\n' Got '\\558\n\\0558\n\n 5c 37\n 5c 30 37\n 5c 30 30 37\n 5c 30 30 30 37\n'

stdout:
\558
\0558

 5c 37
 5c 30 37
 5c 30 30 37
 5c 30 30 30 37
stderr:
zsh59 printf %d %X support hex 0x5 and octal 055

stdout:
hex
85
55
hex CAPS
85
55
octal 3
55
37
octal 4
55
37
octal 5
55
37
stderr:
sush59 printf %d %X support hex 0x5 and octal 055

[sush stdout] Expected 'hex\n85\n55\nhex CAPS\n85\n55\noctal 3\n45\n2D\noctal 4\n45\n2D\noctal 5\n45\n2D\n' Got 'hex\n0x55\nhex CAPS\n0X55\noctal 3\n055\n37\noctal 4\n0055\n37\noctal 5\n00055\n37\n'

stdout:
hex
0x55
hex CAPS
0X55
octal 3
055
37
octal 4
0055
37
octal 5
00055
37
stderr:
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 3: printf: ArithError("", InvalidNumber("0x55"))
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 7: printf: ArithError("", InvalidNumber("0X55"))
zsh60 printf %d with + prefix (positive sign)

stdout:
decimal
42
octal
77
hex lowercase
171
hex uppercase
171
stderr:
sush60 printf %d with + prefix (positive sign)

[sush stdout] Expected 'decimal\n42\noctal\n63\nhex lowercase\n171\nhex uppercase\n171\n' Got 'decimal\n+42\noctal\n+077\nhex lowercase\n+0xab\nhex uppercase\n+0XAB\n'

stdout:
decimal
+42
octal
+077
hex lowercase
+0xab
hex uppercase
+0XAB
stderr:
ash61 leading spaces are accepted in value given to %d %X, but not trailing spaces

stdout:
-123
status=0
0
status=1
---
63
status=0
255
status=0
FF
status=0
ff
status=0
stderr:
ash: invalid number '-123 '
zsh61 leading spaces are accepted in value given to %d %X, but not trailing spaces

stdout:
stderr: 
toysh61 leading spaces are accepted in value given to %d %X, but not trailing spaces

[toysh stdout] Expected '-123\nstatus=0\n-123\nstatus=1\n---\n63\nstatus=0\n255\nstatus=0\nFF\nstatus=0\nff\nstatus=0\n' Got ''
[toysh status] Expected 0 Got -6

stdout:
stderr: 
munmap_chunk(): invalid pointer
sush61 leading spaces are accepted in value given to %d %X, but not trailing spaces

[sush stdout] Expected '-123\nstatus=0\n-123\nstatus=1\n---\n63\nstatus=0\n255\nstatus=0\nFF\nstatus=0\nff\nstatus=0\n' Got ' -123\nstatus=0\n -123 \nstatus=0\n---\n +077\nstatus=0\n +0xff\nstatus=0\nstatus=1\nstatus=1\n'

stdout:
 -123
status=0
 -123 
status=0
---
 +077
status=0
 +0xff
status=0
status=1
status=1
stderr:
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 16: printf: ArithError("", InvalidNumber(" +0xff"))
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 19: printf: ArithError("", InvalidNumber(" +0xff"))
brush61 leading spaces are accepted in value given to %d %X, but not trailing spaces

[brush stdout] Expected '-123\nstatus=0\n-123\nstatus=1\n---\n63\nstatus=0\n255\nstatus=0\nFF\nstatus=0\nff\nstatus=0\n' Got '-123\nstatus=0\n-123\nstatus=0\n---\n63\nstatus=0\n255\nstatus=0\nFF\nstatus=0\nff\nstatus=0\n'

stdout:
-123
status=0
-123
status=0
---
63
status=0
255
status=0
FF
status=0
ff
status=0
stderr:
brush: '\ -123\ ': value not completely converted
osh61 leading spaces are accepted in value given to %d %X, but not trailing spaces

stdout:
-123
status=0
status=1
---
63
status=0
255
status=0
FF
status=0
ff
status=0
stderr:
  printf '%d\n' ' -123 '
                ^
[ stdin ]:5: printf expected an integer, got ' -123 '
bash62 Arbitrary base 64#a is rejected (unlike in shell arithmetic)

stdout:
64
status=1
stderr:
bash: line 1: printf: 64#a: invalid number
dash62 Arbitrary base 64#a is rejected (unlike in shell arithmetic)

stdout:
64
status=1
stderr:
dash: 1: printf: 64#a: not completely converted
ash62 Arbitrary base 64#a is rejected (unlike in shell arithmetic)

stdout:
0
status=1
stderr:
ash: invalid number '64#a'
zsh62 Arbitrary base 64#a is rejected (unlike in shell arithmetic)

stdout:
0
status=1
stderr:
zsh: invalid base (must be 2 to 36 inclusive): 64
mksh62 Arbitrary base 64#a is rejected (unlike in shell arithmetic)

stdout:
64
status=1
stderr:
printf: ‘64#a’: value not completely converted
ksh62 Arbitrary base 64#a is rejected (unlike in shell arithmetic)

[ksh stdout] Expected 'status=1\n' Got '64\nstatus=1\n'

stdout:
64
status=1
stderr:
printf: ‘64#a’: value not completely converted
toysh62 Arbitrary base 64#a is rejected (unlike in shell arithmetic)

[toysh stdout] Expected 'status=1\n' Got '64\nstatus=1\n'

stdout:
64
status=1
stderr:
printf: bad %d 64#a
sush62 Arbitrary base 64#a is rejected (unlike in shell arithmetic)

[sush stdout] Expected 'status=1\n' Got '64#a\nstatus=0\n'

stdout:
64#a
status=0
stderr:
brush62 Arbitrary base 64#a is rejected (unlike in shell arithmetic)

[brush stdout] Expected 'status=1\n' Got '64\nstatus=0\n'

stdout:
64
status=0
stderr:
brush: '64#a': value not completely converted