Results for builtin-printf.test.sh

statusoshosh_.pyosh_.cc
pass 353524
ok 666
N-I 776
FAIL 1113
total494949
caseoshosh_.pyosh_.ccdescription
0pass pass pass printf with no args
1pass pass FAIL printf -v %s
details
2pass pass pass printf -v %q
3pass pass FAIL printf -v a[1]
details
4pass pass pass printf -v syntax error
5pass pass FAIL dynamic declare instead of %s
details
6ok ok ok dynamic declare instead of %q
detailsdetailsdetails
7ok ok ok printf -v dynamic scope
detailsdetailsdetails
8pass pass pass printf with too few arguments
9pass pass pass printf with too many arguments
10pass pass pass printf width strings
11pass pass pass printf integer
12pass pass pass printf %6.4d -- "precision" does padding for integers
13pass pass pass printf %6.4x X o
14pass pass pass %06d zero padding vs. %6.6d
15pass pass pass %06x %06X %06o
16pass pass pass %06s is no-op
17pass pass FAIL printf %6.4s does both truncation and padding
details
18pass pass pass printf %6.0s and %0.0s
19pass pass pass printf %6.s and %0.s
20pass pass pass printf %*.*s (width/precision from args)
21pass pass pass unsigned / octal / hex
22ok ok ok empty string (osh is more strict)
detailsdetailsdetails
23pass pass pass No char after ' (osh is more strict)
24FAIL FAIL FAIL Unicode char with ' (osh is more strict)
detailsdetailsdetails
25N-I N-I N-I negative numbers with unsigned / octal / hex
detailsdetailsdetails
26N-I N-I N-I printf floating point (not required, but they all implement it)
detailsdetailsdetails
27N-I N-I N-I printf floating point with - and 0
detailsdetailsdetails
28N-I N-I N-I printf eE fF gG
detailsdetailsdetails
29pass pass FAIL printf backslash escapes
details
30pass pass FAIL printf octal backslash escapes
details
31pass pass FAIL printf unicode backslash escapes
details
32pass pass pass printf invalid backslash escape (is ignored)
33pass pass pass printf % escapes
34pass pass pass printf %b backslash escaping
35pass pass pass printf %b with \c early return
36N-I N-I FAIL printf %c -- doesn't respect UTF-8! Bad.
detailsdetailsdetails
37ok ok ok printf invalid format
detailsdetailsdetails
38pass pass pass printf %q
39pass pass pass printf %6q (width)
40ok ok ok printf negative numbers
detailsdetailsdetails
41N-I N-I N-I printf + and space flags
detailsdetailsdetails
42N-I N-I N-I printf # flag
detailsdetailsdetails
43ok ok ok Runtime error for invalid integer
detailsdetailsdetails
44pass pass FAIL %(strftime format)T
details
45pass pass FAIL %(strftime format)T doesn't respect TZ if not exported
details
46pass pass FAIL %(strftime format)T TZ in environ but not in shell's memory
details
47pass pass FAIL %10.5(strftime format)T
details
48pass pass pass Regression for 'printf x y'
94 passed, 18 OK, 20 not implemented, 0 BUG, 15 failed, 0 timeouts, 0 cases skipped
1 failed under osh

Details on runs that didn't PASS

osh_.cc1 printf -v %s

[osh_.cc status] Expected 0, got 255

stdout:
['hello there']
stderr:
dumb_alloc:
	gNumNew = 2025
	gNumDelete = 167
	gMemPos = 68928

	gNumMalloc = 141
	gNumFree = 0
	gMemPos2 = 10848
osh_.cc3 printf -v a[1]

[osh_.cc status] Expected 0, got 255

stdout:
status=0
['a', 'foo', 'c']
stderr:
dumb_alloc:
	gNumNew = 2482
	gNumDelete = 242
	gMemPos = 81840

	gNumMalloc = 307
	gNumFree = 0
	gMemPos2 = 13600
osh_.cc5 dynamic declare instead of %s

[osh_.cc status] Expected 0, got 255

stdout:
['hello there']
stderr:
dumb_alloc:
	gNumNew = 1925
	gNumDelete = 160
	gMemPos = 66816

	gNumMalloc = 75
	gNumFree = 0
	gMemPos2 = 9792
osh6 dynamic declare instead of %q

stdout:
$'"quoted" with spaces and \\'
stderr:
osh_.py6 dynamic declare instead of %q

stdout:
$'"quoted" with spaces and \\'
stderr:
osh_.cc6 dynamic declare instead of %q

stdout:
$'"quoted" with spaces and \\'
stderr:
dumb_alloc:
	gNumNew = 2022
	gNumDelete = 167
	gMemPos = 69520

	gNumMalloc = 131
	gNumFree = 0
	gMemPos2 = 10848
osh7 printf -v dynamic scope

stdout:
dollar=dollar
--
dollar='$'
mylocal=mylocal
--
dollar='$'
mylocal=
stderr:
osh_.py7 printf -v dynamic scope

stdout:
dollar=dollar
--
dollar='$'
mylocal=mylocal
--
dollar='$'
mylocal=
stderr:
osh_.cc7 printf -v dynamic scope

stdout:
dollar=dollar
--
dollar='$'
mylocal=mylocal
--
dollar='$'
mylocal=
stderr:
dumb_alloc:
	gNumNew = 3473
	gNumDelete = 387
	gMemPos = 109616

	gNumMalloc = 634
	gNumFree = 0
	gMemPos2 = 18816
osh_.cc17 printf %6.4s does both truncation and padding

[osh_.cc stdout] Expected '[ foo]\n[ foo]\n[foo ]\n[spam-eggs]\n[ spam]\n[spam ]\n', got '[ foo]\n[ foo\x00]\n[foo\x00 ]\n[spam-eggs]\n[ spam]\n[spam ]\n'

stdout:
[   foo]
[  foo]
[foo  ]
[spam-eggs]
[  spam]
[spam  ]
stderr:
dumb_alloc:
	gNumNew = 2663
	gNumDelete = 274
	gMemPos = 87552

	gNumMalloc = 396
	gNumFree = 0
	gMemPos2 = 14976
osh22 empty string (osh is more strict)

stdout:
stderr: 
  printf '%d\n' ''
                ^
[ stdin ]:1: printf expected an integer, got ''
osh_.py22 empty string (osh is more strict)

stdout:
stderr: 
  printf '%d\n' ''
                ^
[ stdin ]:1: printf expected an integer, got ''
osh_.cc22 empty string (osh is more strict)

stdout:
stderr: 
  printf '%d\n' ''
                ^
[ stdin ]:1: printf expected an integer, got ''

dumb_alloc:
	gNumNew = 1802
	gNumDelete = 123
	gMemPos = 62608

	gNumMalloc = 78
	gNumFree = 0
	gMemPos2 = 9856
osh24 Unicode char with ' (osh is more strict)

[osh stdout] Expected '3bc\n', got 'ce\n'

stdout:
ce
stderr:
osh_.py24 Unicode char with ' (osh is more strict)

[osh_.py stdout] Expected '3bc\n', got 'ce\n'

stdout:
ce
stderr:
osh_.cc24 Unicode char with ' (osh is more strict)

[osh_.cc stdout] Expected '3bc\n', got 'ce\n'

stdout:
ce
stderr:
dumb_alloc:
	gNumNew = 1820
	gNumDelete = 133
	gMemPos = 63024

	gNumMalloc = 83
	gNumFree = 0
	gMemPos2 = 9920
osh25 negative numbers with unsigned / octal / hex

stdout:
stderr: 
  [%u]\n
    ^
[ printf word at line 1 of [ stdin ] ]:1: fatal: Can't format negative number -42 with %u
osh_.py25 negative numbers with unsigned / octal / hex

stdout:
stderr: 
  [%u]\n
    ^
[ printf word at line 1 of [ stdin ] ]:1: fatal: Can't format negative number -42 with %u
osh_.cc25 negative numbers with unsigned / octal / hex

stdout:
stderr: 
  printf '[%u]\n' -42
  ^~~~~~
[ stdin ]:1: fatal: Can't format negative number -42 with %u

dumb_alloc:
	gNumNew = 1808
	gNumDelete = 125
	gMemPos = 62784

	gNumMalloc = 79
	gNumFree = 0
	gMemPos2 = 9872
osh26 printf floating point (not required, but they all implement it)

stdout:
stderr: 
  [%f]\n
    ^
[ printf word at line 1 of [ stdin ] ]:1: osh printf doesn't support floating point
  [%.2f]\n
      ^
[ printf word at line 2 of [ stdin ] ]:1: osh printf doesn't support floating point
  [%8.2f]\n
       ^
[ printf word at line 3 of [ stdin ] ]:1: osh printf doesn't support floating point
  [%-8.2f]\n
        ^
[ printf word at line 4 of [ stdin ] ]:1: osh printf doesn't support floating point
  [%-f]\n
     ^
[ printf word at line 5 of [ stdin ] ]:1: osh printf doesn't support floating point
  [%-f]\n
     ^
[ printf word at line 6 of [ stdin ] ]:1: osh printf doesn't support floating point
osh_.py26 printf floating point (not required, but they all implement it)

stdout:
stderr: 
  [%f]\n
    ^
[ printf word at line 1 of [ stdin ] ]:1: osh printf doesn't support floating point
  [%.2f]\n
      ^
[ printf word at line 2 of [ stdin ] ]:1: osh printf doesn't support floating point
  [%8.2f]\n
       ^
[ printf word at line 3 of [ stdin ] ]:1: osh printf doesn't support floating point
  [%-8.2f]\n
        ^
[ printf word at line 4 of [ stdin ] ]:1: osh printf doesn't support floating point
  [%-f]\n
     ^
[ printf word at line 5 of [ stdin ] ]:1: osh printf doesn't support floating point
  [%-f]\n
     ^
[ printf word at line 6 of [ stdin ] ]:1: osh printf doesn't support floating point
osh_.cc26 printf floating point (not required, but they all implement it)

stdout:
stderr: 
  [%f]\n
    ^
[ printf word at line 1 of [ stdin ] ]:1: osh printf doesn't support floating point
  [%.2f]\n
      ^
[ printf word at line 2 of [ stdin ] ]:1: osh printf doesn't support floating point
  [%8.2f]\n
       ^
[ printf word at line 3 of [ stdin ] ]:1: osh printf doesn't support floating point
  [%-8.2f]\n
        ^
[ printf word at line 4 of [ stdin ] ]:1: osh printf doesn't support floating point
  [%-f]\n
     ^
[ printf word at line 5 of [ stdin ] ]:1: osh printf doesn't support floating point
  [%-f]\n
     ^
[ printf word at line 6 of [ stdin ] ]:1: osh printf doesn't support floating point

dumb_alloc:
	gNumNew = 2691
	gNumDelete = 253
	gMemPos = 88496

	gNumMalloc = 422
	gNumFree = 0
	gMemPos2 = 15344
osh27 printf floating point with - and 0

stdout:
---
stderr:
  [%8.4f]\n
       ^
[ printf word at line 1 of [ stdin ] ]:1: osh printf doesn't support floating point
  [%08.4f]\n
        ^
[ printf word at line 2 of [ stdin ] ]:1: osh printf doesn't support floating point
  [%8.04f]\n
       ^
[ printf word at line 3 of [ stdin ] ]:1: Expected a printf format character
  [%08.04f]\n
        ^
[ printf word at line 4 of [ stdin ] ]:1: Expected a printf format character
  [%-8.4f]\n
        ^
[ printf word at line 6 of [ stdin ] ]:1: osh printf doesn't support floating point
  [%-08.4f]\n
         ^
[ printf word at line 7 of [ stdin ] ]:1: osh printf doesn't support floating point
  [%-8.04f]\n
        ^
[ printf word at line 8 of [ stdin ] ]:1: Expected a printf format character
  [%-08.04f]\n
         ^
[ printf word at line 9 of [ stdin ] ]:1: Expected a printf format character
osh_.py27 printf floating point with - and 0

stdout:
---
stderr:
  [%8.4f]\n
       ^
[ printf word at line 1 of [ stdin ] ]:1: osh printf doesn't support floating point
  [%08.4f]\n
        ^
[ printf word at line 2 of [ stdin ] ]:1: osh printf doesn't support floating point
  [%8.04f]\n
       ^
[ printf word at line 3 of [ stdin ] ]:1: Expected a printf format character
  [%08.04f]\n
        ^
[ printf word at line 4 of [ stdin ] ]:1: Expected a printf format character
  [%-8.4f]\n
        ^
[ printf word at line 6 of [ stdin ] ]:1: osh printf doesn't support floating point
  [%-08.4f]\n
         ^
[ printf word at line 7 of [ stdin ] ]:1: osh printf doesn't support floating point
  [%-8.04f]\n
        ^
[ printf word at line 8 of [ stdin ] ]:1: Expected a printf format character
  [%-08.04f]\n
         ^
[ printf word at line 9 of [ stdin ] ]:1: Expected a printf format character
osh_.cc27 printf floating point with - and 0

stdout:
---
stderr:
  [%8.4f]\n
       ^
[ printf word at line 1 of [ stdin ] ]:1: osh printf doesn't support floating point
  [%08.4f]\n
        ^
[ printf word at line 2 of [ stdin ] ]:1: osh printf doesn't support floating point
  [%8.04f]\n
       ^
[ printf word at line 3 of [ stdin ] ]:1: Expected a printf format character
  [%08.04f]\n
        ^
[ printf word at line 4 of [ stdin ] ]:1: Expected a printf format character
  [%-8.4f]\n
        ^
[ printf word at line 6 of [ stdin ] ]:1: osh printf doesn't support floating point
  [%-08.4f]\n
         ^
[ printf word at line 7 of [ stdin ] ]:1: osh printf doesn't support floating point
  [%-8.04f]\n
        ^
[ printf word at line 8 of [ stdin ] ]:1: Expected a printf format character
  [%-08.04f]\n
         ^
[ printf word at line 9 of [ stdin ] ]:1: Expected a printf format character

dumb_alloc:
	gNumNew = 3127
	gNumDelete = 313
	gMemPos = 100128

	gNumMalloc = 566
	gNumFree = 0
	gMemPos2 = 17648
osh28 printf eE fF gG

stdout:
stderr: 
  [%e]\n
    ^
[ printf word at line 1 of [ stdin ] ]:1: osh printf doesn't support floating point
  [%E]\n
    ^
[ printf word at line 2 of [ stdin ] ]:1: osh printf doesn't support floating point
  [%f]\n
    ^
[ printf word at line 3 of [ stdin ] ]:1: osh printf doesn't support floating point
  [%g]\n
    ^
[ printf word at line 4 of [ stdin ] ]:1: osh printf doesn't support floating point
  [%G]\n
    ^
[ printf word at line 5 of [ stdin ] ]:1: osh printf doesn't support floating point
osh_.py28 printf eE fF gG

stdout:
stderr: 
  [%e]\n
    ^
[ printf word at line 1 of [ stdin ] ]:1: osh printf doesn't support floating point
  [%E]\n
    ^
[ printf word at line 2 of [ stdin ] ]:1: osh printf doesn't support floating point
  [%f]\n
    ^
[ printf word at line 3 of [ stdin ] ]:1: osh printf doesn't support floating point
  [%g]\n
    ^
[ printf word at line 4 of [ stdin ] ]:1: osh printf doesn't support floating point
  [%G]\n
    ^
[ printf word at line 5 of [ stdin ] ]:1: osh printf doesn't support floating point
osh_.cc28 printf eE fF gG

stdout:
stderr: 
  [%e]\n
    ^
[ printf word at line 1 of [ stdin ] ]:1: osh printf doesn't support floating point
  [%E]\n
    ^
[ printf word at line 2 of [ stdin ] ]:1: osh printf doesn't support floating point
  [%f]\n
    ^
[ printf word at line 3 of [ stdin ] ]:1: osh printf doesn't support floating point
  [%g]\n
    ^
[ printf word at line 4 of [ stdin ] ]:1: osh printf doesn't support floating point
  [%G]\n
    ^
[ printf word at line 5 of [ stdin ] ]:1: osh printf doesn't support floating point

dumb_alloc:
	gNumNew = 2456
	gNumDelete = 225
	gMemPos = 80800

	gNumMalloc = 300
	gNumFree = 0
	gMemPos2 = 13392
osh_.cc29 printf backslash escapes

[osh_.cc stdout] Expected "['a\\tb']\n['\\xe2\\x98\\xa0']\n['$e']\n['\\x1f7']\n", got ''
[osh_.cc status] Expected 0, got -6

stdout:
stderr: 
osh_eval.opt: cpp/posix.h:74: Tuple2<int, int> posix::pipe(): Assertion `0' failed.
osh_.cc30 printf octal backslash escapes

[osh_.cc stdout] Expected "['\\x1f7']\n['\\xff']\n", got ''
[osh_.cc status] Expected 0, got -6

stdout:
stderr: 
osh_eval.opt: cpp/posix.h:74: Tuple2<int, int> posix::pipe(): Assertion `0' failed.
osh_.cc31 printf unicode backslash escapes

[osh_.cc stdout] Expected "['\\xe2\\x98\\xa0']\n['\\xd9\\x9f']\n", got ''
[osh_.cc status] Expected 0, got -6

stdout:
stderr: 
osh_eval.opt: cpp/posix.h:74: Tuple2<int, int> posix::pipe(): Assertion `0' failed.
osh36 printf %c -- doesn't respect UTF-8! Bad.

stdout:
[μμ]
0
stderr:
  %c
   ^
[ printf word at line 3 of [ stdin ] ]:1: osh printf doesn't support single characters (bytes)
osh_.py36 printf %c -- doesn't respect UTF-8! Bad.

stdout:
[μμ]
0
stderr:
  %c
   ^
[ printf word at line 3 of [ stdin ] ]:1: osh printf doesn't support single characters (bytes)
osh_.cc36 printf %c -- doesn't respect UTF-8! Bad.

[osh_.cc stdout] Expected '[\xce\xbc\xce\xbc]\n0\n', got ''
[osh_.cc status] Expected 0, got -6

stdout:
stderr: 
osh_eval.opt: cpp/posix.h:74: Tuple2<int, int> posix::pipe(): Assertion `0' failed.
osh37 printf invalid format

stdout:
status=2
status=2
stderr:
  %z
   ^
[ printf word at line 1 of [ stdin ] ]:1: Invalid printf format character
  %-z
    ^
[ printf word at line 3 of [ stdin ] ]:1: Invalid printf format character
osh_.py37 printf invalid format

stdout:
status=2
status=2
stderr:
  %z
   ^
[ printf word at line 1 of [ stdin ] ]:1: Invalid printf format character
  %-z
    ^
[ printf word at line 3 of [ stdin ] ]:1: Invalid printf format character
osh_.cc37 printf invalid format

stdout:
status=2
status=2
stderr:
  %z
   ^
[ printf word at line 1 of [ stdin ] ]:1: Invalid printf format character
  %-z
    ^
[ printf word at line 3 of [ stdin ] ]:1: Invalid printf format character

dumb_alloc:
	gNumNew = 2233
	gNumDelete = 194
	gMemPos = 74064

	gNumMalloc = 225
	gNumFree = 0
	gMemPos2 = 12192
osh40 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=1
stderr:
  printf '[%d] ' ' -42z'
                 ^
[ stdin ]:16: printf expected an integer, got ' -42z'
  printf '[%i] ' ' -42z'
                 ^
[ stdin ]:18: printf expected an integer, got ' -42z'
osh_.py40 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=1
stderr:
  printf '[%d] ' ' -42z'
                 ^
[ stdin ]:16: printf expected an integer, got ' -42z'
  printf '[%i] ' ' -42z'
                 ^
[ stdin ]:18: printf expected an integer, got ' -42z'
osh_.cc40 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=1
stderr:
  printf '[%d] ' ' -42z'
                 ^
[ stdin ]:16: printf expected an integer, got ' -42z'
  printf '[%i] ' ' -42z'
                 ^
[ stdin ]:18: printf expected an integer, got ' -42z'

dumb_alloc:
	gNumNew = 3967
	gNumDelete = 485
	gMemPos = 122608

	gNumMalloc = 803
	gNumFree = 0
	gMemPos2 = 21472
osh41 printf + and space flags

stdout:
stderr: 
  [%+d]\n
    ^
[ printf word at line 1 of [ stdin ] ]:1: osh printf doesn't support the '+' flag
  [%+d]\n
    ^
[ printf word at line 2 of [ stdin ] ]:1: osh printf doesn't support the '+' flag
  [% d]\n
    ^
[ printf word at line 3 of [ stdin ] ]:1: osh printf doesn't support the ' ' flag
  [% d]\n
    ^
[ printf word at line 4 of [ stdin ] ]:1: osh printf doesn't support the ' ' flag
osh_.py41 printf + and space flags

stdout:
stderr: 
  [%+d]\n
    ^
[ printf word at line 1 of [ stdin ] ]:1: osh printf doesn't support the '+' flag
  [%+d]\n
    ^
[ printf word at line 2 of [ stdin ] ]:1: osh printf doesn't support the '+' flag
  [% d]\n
    ^
[ printf word at line 3 of [ stdin ] ]:1: osh printf doesn't support the ' ' flag
  [% d]\n
    ^
[ printf word at line 4 of [ stdin ] ]:1: osh printf doesn't support the ' ' flag
osh_.cc41 printf + and space flags

stdout:
stderr: 
  [%+d]\n
    ^
[ printf word at line 1 of [ stdin ] ]:1: osh printf doesn't support the '+' flag
  [%+d]\n
    ^
[ printf word at line 2 of [ stdin ] ]:1: osh printf doesn't support the '+' flag
  [% d]\n
    ^
[ printf word at line 3 of [ stdin ] ]:1: osh printf doesn't support the ' ' flag
  [% d]\n
    ^
[ printf word at line 4 of [ stdin ] ]:1: osh printf doesn't support the ' ' flag

dumb_alloc:
	gNumNew = 2273
	gNumDelete = 197
	gMemPos = 75648

	gNumMalloc = 227
	gNumFree = 0
	gMemPos2 = 12224
osh42 printf # flag

stdout:
---
stderr:
  [%#o][%#o]\n
    ^
[ printf word at line 1 of [ stdin ] ]:1: osh printf doesn't support the '#' flag
  [%#x][%#x]\n
    ^
[ printf word at line 2 of [ stdin ] ]:1: osh printf doesn't support the '#' flag
  [%#X][%#X]\n
    ^
[ printf word at line 3 of [ stdin ] ]:1: osh printf doesn't support the '#' flag
  [%.0f][%#.0f]\n
      ^
[ printf word at line 5 of [ stdin ] ]:1: osh printf doesn't support floating point
  [%g][%#g]\n
    ^
[ printf word at line 6 of [ stdin ] ]:1: osh printf doesn't support floating point
osh_.py42 printf # flag

stdout:
---
stderr:
  [%#o][%#o]\n
    ^
[ printf word at line 1 of [ stdin ] ]:1: osh printf doesn't support the '#' flag
  [%#x][%#x]\n
    ^
[ printf word at line 2 of [ stdin ] ]:1: osh printf doesn't support the '#' flag
  [%#X][%#X]\n
    ^
[ printf word at line 3 of [ stdin ] ]:1: osh printf doesn't support the '#' flag
  [%.0f][%#.0f]\n
      ^
[ printf word at line 5 of [ stdin ] ]:1: osh printf doesn't support floating point
  [%g][%#g]\n
    ^
[ printf word at line 6 of [ stdin ] ]:1: osh printf doesn't support floating point
osh_.cc42 printf # flag

stdout:
---
stderr:
  [%#o][%#o]\n
    ^
[ printf word at line 1 of [ stdin ] ]:1: osh printf doesn't support the '#' flag
  [%#x][%#x]\n
    ^
[ printf word at line 2 of [ stdin ] ]:1: osh printf doesn't support the '#' flag
  [%#X][%#X]\n
    ^
[ printf word at line 3 of [ stdin ] ]:1: osh printf doesn't support the '#' flag
  [%.0f][%#.0f]\n
      ^
[ printf word at line 5 of [ stdin ] ]:1: osh printf doesn't support floating point
  [%g][%#g]\n
    ^
[ printf word at line 6 of [ stdin ] ]:1: osh printf doesn't support floating point

dumb_alloc:
	gNumNew = 2654
	gNumDelete = 244
	gMemPos = 86320

	gNumMalloc = 349
	gNumFree = 0
	gMemPos2 = 14176
osh43 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'
osh_.py43 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'
osh_.cc43 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'

dumb_alloc:
	gNumNew = 2305
	gNumDelete = 201
	gMemPos = 76464

	gNumMalloc = 267
	gNumFree = 0
	gMemPos2 = 12896
osh_.cc44 %(strftime format)T

[osh_.cc stdout] Expected '2019-05-16\n2019-05-15\nstatus=0\n', got ''
[osh_.cc status] Expected 0, got -6

stdout:
stderr: 
osh_eval.opt: cpp/posix.h:83: int posix::putenv(Str*, Str*): Assertion `0' failed.
osh_.cc45 %(strftime format)T doesn't respect TZ if not exported

[osh_.cc stdout] Expected 'not equal\n', got ''
[osh_.cc status] Expected 0, got -6

stdout:
stderr: 
osh_eval.opt: cpp/posix.h:74: Tuple2<int, int> posix::pipe(): Assertion `0' failed.
osh_.cc46 %(strftime format)T TZ in environ but not in shell's memory

[osh_.cc stdout] Expected 'not equal\n', got ''
[osh_.cc status] Expected 0, got -6

stdout:
stderr: 
osh_eval.opt: cpp/posix.h:74: Tuple2<int, int> posix::pipe(): Assertion `0' failed.
osh_.cc47 %10.5(strftime format)T

[osh_.cc stdout] Expected '[ 2019-]\n[ 2019-]\nstatus=0\n', got ''
[osh_.cc status] Expected 0, got -6

stdout:
stderr: 
osh_eval.opt: cpp/posix.h:83: int posix::putenv(Str*, Str*): Assertion `0' failed.