Results for builtin-printf.test.sh

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

Details on runs that didn't PASS

osh_.cc1 printf -v %s

[osh_.cc stdout] Expected "['hello there']\n", got "(cmd_value.Argv argv:[argv.py ''] arg_spids:[16 18])\n"

stdout:
(cmd_value.Argv argv:[argv.py ''] arg_spids:[16 18])
stderr:
Unhandled SimpleCommand
osh_.cc2 printf -v %q

[osh_.cc stdout] Expected 'OK\n', got ''
[osh_.cc status] Expected 0, got 1

stdout:
stderr: 
osh3 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_.py3 printf -v a[1]

[osh_.py stdout] Expected "status=2\n['a', 'b', 'c']\n", got "['a', 'b', 'c']\nstatus=2\n"

stdout:
['a', 'b', 'c']
status=2
stderr:
osh_.cc3 printf -v a[1]

[osh_.cc stdout] Expected "status=2\n['a', 'b', 'c']\n", got 'status=2\n(cmd_value.Argv argv:[argv.py a b c] arg_spids:[29 31 31 31])\n'

stdout:
status=2
(cmd_value.Argv argv:[argv.py a b c] arg_spids:[29 31 31 31])
stderr:
Unhandled SimpleCommand
osh_.cc4 dynamic declare instead of %s

[osh_.cc stdout] Expected "['hello there']\n", got "(cmd_value.Argv argv:[argv.py 'hello there'] arg_spids:[11 13])\n"

stdout:
(cmd_value.Argv argv:[argv.py 'hello there'] arg_spids:[11 13])
stderr:
Unhandled SimpleCommand
osh5 dynamic declare instead of %q

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

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

[osh_.cc stdout] Expected '$\'"quoted" with spaces and \\\\\'\n', got ''
[osh_.cc status] Expected 0, got -11

stdout:
stderr: 
osh6 printf -v dynamic scope

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

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

[osh_.cc stdout] Expected "dollar=dollar\n--\ndollar='$'\nmylocal=mylocal\n--\ndollar='$'\nmylocal=\n", got 'dollar=dollar\n--\ndollar=dollar\nmylocal=foo\n--\ndollar=dollar\nmylocal=foo\n'

stdout:
dollar=dollar
--
dollar=dollar
mylocal=foo
--
dollar=dollar
mylocal=foo
stderr:
osh_.cc7 printf with too few arguments

[osh_.cc stdout] Expected '-a b-x y--\n', got ''
[osh_.cc status] Expected 0, got 2

stdout:
stderr: 
osh_.cc8 printf with too many arguments

[osh_.cc stdout] Expected '-a-b-\n-c-d-\n-e--\n', got ''
[osh_.cc status] Expected 0, got 2

stdout:
stderr: 
osh_.cc9 printf width strings

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

stdout:
stderr: 
osh_eval.dbg: mycpp/mylib.h:327: Str *Str::rjust(int, Str *): Assertion `0' failed.
osh_.cc10 printf integer

[osh_.cc stdout] Expected '42\n42\n97\n97\n[ 42]\n[42 ]\n[00042]\n', got '42\n42\n97\n97\n'
[osh_.cc status] Expected 0, got -6

stdout:
42
42
97
97
stderr:
osh_eval.dbg: mycpp/mylib.h:327: Str *Str::rjust(int, Str *): Assertion `0' failed.
osh11 printf %6.4d -- precision means something different for integers !?

stdout:
stderr: 
  [%6.4d]\n
      ^
(source.ArgvWord word_spid:2):1: printf precision can't be specified with type 'd'
osh_.py11 printf %6.4d -- precision means something different for integers !?

stdout:
stderr: 
  [%6.4d]\n
      ^
(source.ArgvWord word_spid:2):1: printf precision can't be specified with type 'd'
osh_.cc11 printf %6.4d -- precision means something different for integers !?

stdout:
stderr: 
  [%6.4d]\n
      ^
TODO:1: dynamic_fmt_dummy
osh_.cc12 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 ''
[osh_.cc status] Expected 0, got -6

stdout:
stderr: 
osh_eval.dbg: mycpp/mylib.h:327: Str *Str::rjust(int, Str *): Assertion `0' failed.
osh_.cc13 printf %6.0s and %0.0s

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

stdout:
stderr: 
osh_eval.dbg: mycpp/mylib.h:327: Str *Str::rjust(int, Str *): Assertion `0' failed.
osh_.cc14 printf %6.s and %0.s

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

stdout:
stderr: 
osh_eval.dbg: mycpp/mylib.h:327: Str *Str::rjust(int, Str *): Assertion `0' failed.
osh_.cc15 printf %*.*s (width/precision from args)

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

stdout:
stderr: 
osh_eval.dbg: mycpp/mylib.h:327: Str *Str::rjust(int, Str *): Assertion `0' failed.
osh_.cc16 unsigned / octal / hex

[osh_.cc stdout] Expected '[42]\n[52]\n[2a]\n[2A]\n[61]\n[61]\n', got '[42]\n'
[osh_.cc status] Expected 0, got -6

stdout:
[42]
stderr:
osh_eval.dbg: mycpp/mylib.h:1126: Str *mylib::octal(int): Assertion `0' failed.
osh17 empty string (osh is more strict)

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

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

stdout:
stderr: 
  printf '%d\n' ''
                ^
[ stdin ]:1: printf expected an integer, got ''
osh19 Unicode char with ' (osh is more strict)

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

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

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

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

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

stdout:
stderr: 
osh_eval.dbg: mycpp/mylib.h:1118: Str *mylib::hex_lower(int): Assertion `0' failed.
osh20 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_.py20 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_.cc20 negative numbers with unsigned / octal / hex

stdout:
stderr: 
  printf '[%u]\n' -42
  ^~~~~~
[ stdin ]:1: fatal: Can't format negative number -42 with %u
osh21 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_.py21 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_.cc21 printf floating point (not required, but they all implement it)

stdout:
stderr: 
  [%f]\n
    ^
TODO:1: osh printf doesn't support floating point
  [%.2f]\n
      ^
TODO:1: osh printf doesn't support floating point
  [%8.2f]\n
       ^
TODO:1: osh printf doesn't support floating point
  [%-8.2f]\n
        ^
TODO:1: osh printf doesn't support floating point
  [%-f]\n
     ^
TODO:1: osh printf doesn't support floating point
  [%-f]\n
     ^
TODO:1: osh printf doesn't support floating point
osh22 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_.py22 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_.cc22 printf floating point with - and 0

stdout:
---
stderr:
  [%8.4f]\n
       ^
TODO:1: osh printf doesn't support floating point
  [%08.4f]\n
        ^
TODO:1: osh printf doesn't support floating point
  [%8.04f]\n
       ^
TODO:1: dynamic_fmt_dummy
  [%08.04f]\n
        ^
TODO:1: dynamic_fmt_dummy
  [%-8.4f]\n
        ^
TODO:1: osh printf doesn't support floating point
  [%-08.4f]\n
         ^
TODO:1: osh printf doesn't support floating point
  [%-8.04f]\n
        ^
TODO:1: dynamic_fmt_dummy
  [%-08.04f]\n
         ^
TODO:1: dynamic_fmt_dummy
osh23 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_.py23 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_.cc23 printf eE fF gG

stdout:
stderr: 
  [%e]\n
    ^
TODO:1: osh printf doesn't support floating point
  [%E]\n
    ^
TODO:1: osh printf doesn't support floating point
  [%f]\n
    ^
TODO:1: osh printf doesn't support floating point
  [%g]\n
    ^
TODO:1: osh printf doesn't support floating point
  [%G]\n
    ^
TODO:1: osh printf doesn't support floating point
osh_.py24 printf backslash escapes

[osh_.py stdout] Expected "['a\\tb']\n['\\xe2\\x98\\xa0']\n['$e']\n['\\x1f7']\n", got ''
[osh_.py status] Expected 0, got 1
[osh_.py stderr] Found 'Traceback (most recent'

stdout:
stderr: 
Traceback (most recent call last):
  File "/home/andy/git/oilshell/oil/bin/osh_eval.py", line 417, in <module>
    status = main(sys.argv)
  File "/home/andy/git/oilshell/oil/bin/osh_eval.py", line 309, in main
    cmd_flags=cmd_eval.IsMainProgram)
  File "/home/andy/git/oilshell/oil/core/main_loop.py", line 168, in Batch
    is_return, is_fatal = cmd_ev.ExecuteAndCatch(node, cmd_flags=cmd_flags)
  File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 1461, in ExecuteAndCatch
    status = self._Execute(node)
  File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 1341, in _Execute
    status, check_errexit = self._Dispatch(node)
  File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 547, in _Dispatch
    cmd_val = self.word_ev.EvalWordSequence2(words, allow_assign=True)
  File "/home/andy/git/oilshell/oil/osh/word_eval.py", line 1868, in EvalWordSequence2
    self._EvalWordToParts(w, False, part_vals)  # not double quoted
  File "/home/andy/git/oilshell/oil/osh/word_eval.py", line 1455, in _EvalWordToParts
    self._EvalWordPart(p, part_vals, quoted=quoted, is_subst=is_subst)
  File "/home/andy/git/oilshell/oil/osh/word_eval.py", line 1326, in _EvalWordPart
    self._EvalDoubleQuoted(part.parts, part_vals)
  File "/home/andy/git/oilshell/oil/osh/word_eval.py", line 821, in _EvalDoubleQuoted
    self._EvalWordPart(p, part_vals, quoted=True)
  File "/home/andy/git/oilshell/oil/osh/word_eval.py", line 1332, in _EvalWordPart
    sv = self._EvalCommandSub(part.child, quoted) # type: part_value_t
  File "/home/andy/git/oilshell/oil/osh/word_eval.py", line 1959, in _EvalCommandSub
    stdout = self.shell_ex.RunCommandSub(node)
AttributeError: 'NoneType' object has no attribute 'RunCommandSub'
osh_.cc24 printf backslash escapes

[osh_.cc stdout] Expected "['a\\tb']\n['\\xe2\\x98\\xa0']\n['$e']\n['\\x1f7']\n", got "(cmd_value.Argv argv:[argv.py ''] arg_spids:[0 2])\n(cmd_value.Argv argv:[argv.py ''] arg_spids:[12 14])\n(cmd_value.Argv argv:[argv.py ''] arg_spids:[24 26])\n(cmd_value.Argv argv:[argv.py ''] arg_spids:[36 38])\n"

stdout:
(cmd_value.Argv argv:[argv.py ''] arg_spids:[0 2])
(cmd_value.Argv argv:[argv.py ''] arg_spids:[12 14])
(cmd_value.Argv argv:[argv.py ''] arg_spids:[24 26])
(cmd_value.Argv argv:[argv.py ''] arg_spids:[36 38])
stderr:
Unhandled SimpleCommand
Unhandled SimpleCommand
Unhandled SimpleCommand
Unhandled SimpleCommand
osh_.py25 printf octal backslash escapes

[osh_.py stdout] Expected "['\\x1f7']\n['\\xff']\n", got ''
[osh_.py status] Expected 0, got 1
[osh_.py stderr] Found 'Traceback (most recent'

stdout:
stderr: 
Traceback (most recent call last):
  File "/home/andy/git/oilshell/oil/bin/osh_eval.py", line 417, in <module>
    status = main(sys.argv)
  File "/home/andy/git/oilshell/oil/bin/osh_eval.py", line 309, in main
    cmd_flags=cmd_eval.IsMainProgram)
  File "/home/andy/git/oilshell/oil/core/main_loop.py", line 168, in Batch
    is_return, is_fatal = cmd_ev.ExecuteAndCatch(node, cmd_flags=cmd_flags)
  File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 1461, in ExecuteAndCatch
    status = self._Execute(node)
  File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 1341, in _Execute
    status, check_errexit = self._Dispatch(node)
  File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 547, in _Dispatch
    cmd_val = self.word_ev.EvalWordSequence2(words, allow_assign=True)
  File "/home/andy/git/oilshell/oil/osh/word_eval.py", line 1868, in EvalWordSequence2
    self._EvalWordToParts(w, False, part_vals)  # not double quoted
  File "/home/andy/git/oilshell/oil/osh/word_eval.py", line 1455, in _EvalWordToParts
    self._EvalWordPart(p, part_vals, quoted=quoted, is_subst=is_subst)
  File "/home/andy/git/oilshell/oil/osh/word_eval.py", line 1326, in _EvalWordPart
    self._EvalDoubleQuoted(part.parts, part_vals)
  File "/home/andy/git/oilshell/oil/osh/word_eval.py", line 821, in _EvalDoubleQuoted
    self._EvalWordPart(p, part_vals, quoted=True)
  File "/home/andy/git/oilshell/oil/osh/word_eval.py", line 1332, in _EvalWordPart
    sv = self._EvalCommandSub(part.child, quoted) # type: part_value_t
  File "/home/andy/git/oilshell/oil/osh/word_eval.py", line 1959, in _EvalCommandSub
    stdout = self.shell_ex.RunCommandSub(node)
AttributeError: 'NoneType' object has no attribute 'RunCommandSub'
osh_.cc25 printf octal backslash escapes

[osh_.cc stdout] Expected "['\\x1f7']\n['\\xff']\n", got "(cmd_value.Argv argv:[argv.py ''] arg_spids:[0 2])\n(cmd_value.Argv argv:[argv.py ''] arg_spids:[12 14])\n"

stdout:
(cmd_value.Argv argv:[argv.py ''] arg_spids:[0 2])
(cmd_value.Argv argv:[argv.py ''] arg_spids:[12 14])
stderr:
Unhandled SimpleCommand
Unhandled SimpleCommand
osh_.py26 printf unicode backslash escapes

[osh_.py stdout] Expected "['\\xe2\\x98\\xa0']\n['\\xd9\\x9f']\n", got ''
[osh_.py status] Expected 0, got 1
[osh_.py stderr] Found 'Traceback (most recent'

stdout:
stderr: 
Traceback (most recent call last):
  File "/home/andy/git/oilshell/oil/bin/osh_eval.py", line 417, in <module>
    status = main(sys.argv)
  File "/home/andy/git/oilshell/oil/bin/osh_eval.py", line 309, in main
    cmd_flags=cmd_eval.IsMainProgram)
  File "/home/andy/git/oilshell/oil/core/main_loop.py", line 168, in Batch
    is_return, is_fatal = cmd_ev.ExecuteAndCatch(node, cmd_flags=cmd_flags)
  File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 1461, in ExecuteAndCatch
    status = self._Execute(node)
  File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 1341, in _Execute
    status, check_errexit = self._Dispatch(node)
  File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 547, in _Dispatch
    cmd_val = self.word_ev.EvalWordSequence2(words, allow_assign=True)
  File "/home/andy/git/oilshell/oil/osh/word_eval.py", line 1868, in EvalWordSequence2
    self._EvalWordToParts(w, False, part_vals)  # not double quoted
  File "/home/andy/git/oilshell/oil/osh/word_eval.py", line 1455, in _EvalWordToParts
    self._EvalWordPart(p, part_vals, quoted=quoted, is_subst=is_subst)
  File "/home/andy/git/oilshell/oil/osh/word_eval.py", line 1326, in _EvalWordPart
    self._EvalDoubleQuoted(part.parts, part_vals)
  File "/home/andy/git/oilshell/oil/osh/word_eval.py", line 821, in _EvalDoubleQuoted
    self._EvalWordPart(p, part_vals, quoted=True)
  File "/home/andy/git/oilshell/oil/osh/word_eval.py", line 1332, in _EvalWordPart
    sv = self._EvalCommandSub(part.child, quoted) # type: part_value_t
  File "/home/andy/git/oilshell/oil/osh/word_eval.py", line 1959, in _EvalCommandSub
    stdout = self.shell_ex.RunCommandSub(node)
AttributeError: 'NoneType' object has no attribute 'RunCommandSub'
osh_.cc26 printf unicode backslash escapes

[osh_.cc stdout] Expected "['\\xe2\\x98\\xa0']\n['\\xd9\\x9f']\n", got "(cmd_value.Argv argv:[argv.py ''] arg_spids:[0 2])\n(cmd_value.Argv argv:[argv.py ''] arg_spids:[12 14])\n"

stdout:
(cmd_value.Argv argv:[argv.py ''] arg_spids:[0 2])
(cmd_value.Argv argv:[argv.py ''] arg_spids:[12 14])
stderr:
Unhandled SimpleCommand
Unhandled SimpleCommand
osh31 printf %c -- doesn't respect UTF-8! Bad.

stdout:
[μμ]
0
stderr:
  %c
   ^
(source.ArgvWord word_spid:24):1: osh printf doesn't support single characters (bytes)
osh_.py31 printf %c -- doesn't respect UTF-8! Bad.

[osh_.py stdout] Expected '[\xce\xbc\xce\xbc]\n0\n', got '[\xce\xbc\xce\xbc]\n'

stdout:
[μμ]
stderr:
osh_.cc31 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.dbg: mycpp/mylib.h:491: void List<int>::reverse() [T = int]: Assertion `0' failed.
osh32 printf invalid format

stdout:
status=2
status=2
stderr:
  %z
   ^
(source.ArgvWord word_spid:2):1: Invalid printf format character
  %-z
    ^
(source.ArgvWord word_spid:17):1: Invalid printf format character
osh_.py32 printf invalid format

stdout:
status=2
status=2
stderr:
  %z
   ^
(source.ArgvWord word_spid:2):1: Invalid printf format character
  %-z
    ^
(source.ArgvWord word_spid:17):1: Invalid printf format character
osh_.cc32 printf invalid format

stdout:
status=2
status=2
stderr:
  %z
   ^
TODO:1: dynamic_fmt_dummy
  %-z
    ^
TODO:1: dynamic_fmt_dummy
osh_.cc34 printf %6q (width)

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

stdout:
stderr: 
osh_eval.dbg: mycpp/mylib.h:327: Str *Str::rjust(int, Str *): Assertion `0' failed.
osh35 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_.py35 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_.cc35 printf + and space flags

stdout:
stderr: 
  [%+d]\n
    ^
TODO:1: osh printf doesn't support the '+' flag
  [%+d]\n
    ^
TODO:1: osh printf doesn't support the '+' flag
  [% d]\n
    ^
TODO:1: osh printf doesn't support the ' ' flag
  [% d]\n
    ^
TODO:1: osh printf doesn't support the ' ' flag
osh36 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_.py36 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_.cc36 printf # flag

stdout:
---
stderr:
  [%#o][%#o]\n
    ^
TODO:1: osh printf doesn't support the '#' flag
  [%#x][%#x]\n
    ^
TODO:1: osh printf doesn't support the '#' flag
  [%#X][%#X]\n
    ^
TODO:1: osh printf doesn't support the '#' flag
  [%.0f][%#.0f]\n
      ^
TODO:1: osh printf doesn't support floating point
  [%g][%#g]\n
    ^
TODO:1: osh printf doesn't support floating point
osh37 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_.py37 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_.cc37 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
                ^~~
TODO:4: printf expected an integer, got 'xyz'
osh_.cc38 %(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.dbg: cpp/posix.h:84: int posix::putenv(Str *, Str *): Assertion `0' failed.
osh_.py39 %(strftime format)T doesn't respect TZ if not exported

[osh_.py stdout] Expected 'not equal\n', got ''
[osh_.py status] Expected 0, got 1
[osh_.py stderr] Found 'Traceback (most recent'

stdout:
stderr: 
Traceback (most recent call last):
  File "/home/andy/git/oilshell/oil/bin/osh_eval.py", line 417, in <module>
    status = main(sys.argv)
  File "/home/andy/git/oilshell/oil/bin/osh_eval.py", line 309, in main
    cmd_flags=cmd_eval.IsMainProgram)
  File "/home/andy/git/oilshell/oil/core/main_loop.py", line 168, in Batch
    is_return, is_fatal = cmd_ev.ExecuteAndCatch(node, cmd_flags=cmd_flags)
  File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 1461, in ExecuteAndCatch
    status = self._Execute(node)
  File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 1341, in _Execute
    status, check_errexit = self._Dispatch(node)
  File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 837, in _Dispatch
    val = self.word_ev.EvalRhsWord(pair.rhs)
  File "/home/andy/git/oilshell/oil/osh/word_eval.py", line 1602, in EvalRhsWord
    return self.EvalWordToString(w)
  File "/home/andy/git/oilshell/oil/osh/word_eval.py", line 1498, in EvalWordToString
    self._EvalWordPart(p, part_vals, quoted=False)
  File "/home/andy/git/oilshell/oil/osh/word_eval.py", line 1332, in _EvalWordPart
    sv = self._EvalCommandSub(part.child, quoted) # type: part_value_t
  File "/home/andy/git/oilshell/oil/osh/word_eval.py", line 1959, in _EvalCommandSub
    stdout = self.shell_ex.RunCommandSub(node)
AttributeError: 'NoneType' object has no attribute 'RunCommandSub'
osh_.cc39 %(strftime format)T doesn't respect TZ if not exported

[osh_.cc stdout] Expected 'not equal\n', got ''

stdout:
stderr: 
osh_.py40 %(strftime format)T TZ in environ but not in shell's memory

[osh_.py stdout] Expected 'not equal\n', got ''
[osh_.py status] Expected 0, got 1
[osh_.py stderr] Found 'Traceback (most recent'

stdout:
stderr: 
Traceback (most recent call last):
  File "/home/andy/git/oilshell/oil/bin/osh_eval.py", line 417, in <module>
    status = main(sys.argv)
  File "/home/andy/git/oilshell/oil/bin/osh_eval.py", line 309, in main
    cmd_flags=cmd_eval.IsMainProgram)
  File "/home/andy/git/oilshell/oil/core/main_loop.py", line 168, in Batch
    is_return, is_fatal = cmd_ev.ExecuteAndCatch(node, cmd_flags=cmd_flags)
  File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 1461, in ExecuteAndCatch
    status = self._Execute(node)
  File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 1341, in _Execute
    status, check_errexit = self._Dispatch(node)
  File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 837, in _Dispatch
    val = self.word_ev.EvalRhsWord(pair.rhs)
  File "/home/andy/git/oilshell/oil/osh/word_eval.py", line 1602, in EvalRhsWord
    return self.EvalWordToString(w)
  File "/home/andy/git/oilshell/oil/osh/word_eval.py", line 1498, in EvalWordToString
    self._EvalWordPart(p, part_vals, quoted=False)
  File "/home/andy/git/oilshell/oil/osh/word_eval.py", line 1332, in _EvalWordPart
    sv = self._EvalCommandSub(part.child, quoted) # type: part_value_t
  File "/home/andy/git/oilshell/oil/osh/word_eval.py", line 1959, in _EvalCommandSub
    stdout = self.shell_ex.RunCommandSub(node)
AttributeError: 'NoneType' object has no attribute 'RunCommandSub'
osh_.cc40 %(strftime format)T TZ in environ but not in shell's memory

[osh_.cc stdout] Expected 'not equal\n', got ''

stdout:
stderr: 
osh_.cc41 %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.dbg: cpp/posix.h:84: int posix::putenv(Str *, Str *): Assertion `0' failed.