Results for assign.test.sh

statusoshosh_.pyosh_.cc
pass 412120
ok 110
FAIL 22224
total444444
caseoshosh_.pyosh_.ccdescription
0pass FAIL FAIL Env value doesn't persist
detailsdetails
1pass FAIL FAIL Env value with equals
detailsdetails
2pass FAIL FAIL Env binding can use preceding bindings, but not subsequent ones
detailsdetails
3pass FAIL FAIL Env value with two quotes
detailsdetails
4pass FAIL FAIL Env value with escaped <
detailsdetails
5pass pass pass FOO=foo echo [foo]
6pass pass pass FOO=foo fun
7pass FAIL FAIL Multiple temporary envs on the stack
detailsdetails
8pass FAIL FAIL Escaped = in command name
detailsdetails
9pass pass pass Env binding not allowed before compound command
10pass pass pass Trying to run keyword 'for'
11pass FAIL FAIL Empty env binding
detailsdetails
12pass FAIL FAIL Assignment doesn't do word splitting
detailsdetails
13pass FAIL FAIL Assignment doesn't do glob expansion
detailsdetails
14pass FAIL FAIL Env binding in readonly/declare is NOT exported! (pitfall)
detailsdetails
15pass pass pass assignments / array assignments not interpreted after 'echo'
16pass pass pass dynamic local variables (and splitting)
17pass FAIL FAIL readonly x= gives empty string (regression)
detailsdetails
18pass pass pass 'local x' does not set variable
19pass pass pass 'local -a x' does not set variable
20pass pass pass 'local x' and then array assignment
21pass pass pass 'declare -A' and then dict assignment
22pass pass pass declare in an if statement
23pass pass pass Modify a temporary binding
24pass pass pass Reveal existence of "temp frame" (All shells disagree here!!!)
25pass pass pass Test above without 'local' (which is not POSIX)
26pass pass pass Using ${x-default} after unsetting local shadowing a global
27pass pass pass Using ${x-default} after unsetting a temp binding shadowing a global
28pass FAIL FAIL static assignment doesn't split
detailsdetails
29pass FAIL FAIL aliased assignment doesn't split
detailsdetails
30pass FAIL FAIL assignment using dynamic keyword (splits in most shells, not in zsh/osh)
detailsdetails
31pass FAIL FAIL assignment using dynamic var names doesn't split
detailsdetails
32pass FAIL FAIL assign and glob
detailsdetails
33pass FAIL FAIL declare and glob
detailsdetails
34pass pass pass readonly $x where x='b c'
35pass pass pass readonly a=(1 2) no_value c=(3 4) makes 'no_value' readonly
36pass FAIL FAIL export a=1 no_value c=2
detailsdetails
37pass FAIL FAIL local a=loc $var c=loc
detailsdetails
38FAIL FAIL FAIL redirect after assignment builtin (what's going on with dash/bash/mksh here?)
detailsdetailsdetails
39FAIL FAIL FAIL redirect after command sub (like case above but without assignment builtin)
detailsdetailsdetails
40pass pass FAIL redirect after bare assignment
details
41ok ok FAIL redirect after declare -p
detailsdetailsdetails
42pass pass pass declare -a arr does not remove existing arrays (OSH regression)
43pass pass pass declare -A dict does not remove existing arrays (OSH regression)
82 passed, 2 OK, 0 not implemented, 0 BUG, 48 failed, 0 timeouts, 0 cases skipped
2 failed under osh

Details on runs that didn't PASS

osh_.py0 Env value doesn't persist

[osh_.py stdout] Expected 'foo\n--\n', got '--\n'

stdout:
--
stderr:
  FOO=foo printenv.py FOO
          ^~~~~~~~~~~
[ stdin ]:1: 'printenv.py' not found
osh_.cc0 Env value doesn't persist

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

stdout:
--
stderr:
  FOO=foo printenv.py FOO
          ^~~~~~~~~~~
[ stdin ]:1: 'printenv.py' not found
osh_.py1 Env value with equals

[osh_.py stdout] Expected 'foo=foo\n', got ''
[osh_.py status] Expected 0, got 127

stdout:
stderr: 
  FOO=foo=foo printenv.py FOO
              ^~~~~~~~~~~
[ stdin ]:1: 'printenv.py' not found
osh_.cc1 Env value with equals

[osh_.cc stdout] Expected 'foo=foo\n', got ''
[osh_.cc status] Expected 0, got 127

stdout:
stderr: 
  FOO=foo=foo printenv.py FOO
              ^~~~~~~~~~~
[ stdin ]:1: 'printenv.py' not found
osh_.py2 Env binding can use preceding bindings, but not subsequent ones

[osh_.py stdout] Expected 'foo\n[foo][]\nbaz\n', got ''
[osh_.py status] Expected 0, got 127

stdout:
stderr: 
  FOO="foo" BAR="[$FOO][$BAZ]" BAZ=baz printenv.py FOO BAR BAZ
                                       ^~~~~~~~~~~
[ stdin ]:1: 'printenv.py' not found
osh_.cc2 Env binding can use preceding bindings, but not subsequent ones

[osh_.cc stdout] Expected 'foo\n[foo][]\nbaz\n', got ''
[osh_.cc status] Expected 0, got 127

stdout:
stderr: 
  FOO="foo" BAR="[$FOO][$BAZ]" BAZ=baz printenv.py FOO BAR BAZ
                                       ^~~~~~~~~~~
[ stdin ]:1: 'printenv.py' not found
osh_.py3 Env value with two quotes

[osh_.py stdout] Expected 'fooadjacent\n', got ''
[osh_.py status] Expected 0, got 127

stdout:
stderr: 
  FOO='foo'"adjacent" printenv.py FOO
                      ^~~~~~~~~~~
[ stdin ]:1: 'printenv.py' not found
osh_.cc3 Env value with two quotes

[osh_.cc stdout] Expected 'fooadjacent\n', got ''
[osh_.cc status] Expected 0, got 127

stdout:
stderr: 
  FOO='foo'"adjacent" printenv.py FOO
                      ^~~~~~~~~~~
[ stdin ]:1: 'printenv.py' not found
osh_.py4 Env value with escaped <

[osh_.py stdout] Expected 'foo<foo\n', got ''
[osh_.py status] Expected 0, got 127

stdout:
stderr: 
  FOO=foo\<foo printenv.py FOO
               ^~~~~~~~~~~
[ stdin ]:1: 'printenv.py' not found
osh_.cc4 Env value with escaped <

[osh_.cc stdout] Expected 'foo<foo\n', got ''
[osh_.cc status] Expected 0, got 127

stdout:
stderr: 
  FOO=foo\<foo printenv.py FOO
               ^~~~~~~~~~~
[ stdin ]:1: 'printenv.py' not found
osh_.py7 Multiple temporary envs on the stack

[osh_.py stdout] Expected 'f [] [A]\n--- g() ---\nf\n[]\n[A]\nNone\np\n--- f() ---\nf\nNone\nNone\nNone\nNone\n', got 'f [] [A]\n--- g() ---\n--- f() ---\n'
[osh_.py status] Expected 0, got 127

stdout:
f [] [A]
--- g() ---
--- f() ---
stderr:
    P=p printenv.py F G1 G2 A P
        ^~~~~~~~~~~
[ stdin ]:4: 'printenv.py' not found
    printenv.py F G1 G2 A P
    ^~~~~~~~~~~
[ stdin ]:9: 'printenv.py' not found
osh_.cc7 Multiple temporary envs on the stack

[osh_.cc stdout] Expected 'f [] [A]\n--- g() ---\nf\n[]\n[A]\nNone\np\n--- f() ---\nf\nNone\nNone\nNone\nNone\n', got 'f [] [A]\n--- g() ---\n--- f() ---\n'
[osh_.cc status] Expected 0, got 127

stdout:
f [] [A]
--- g() ---
--- f() ---
stderr:
    P=p printenv.py F G1 G2 A P
        ^~~~~~~~~~~
[ stdin ]:4: 'printenv.py' not found
    printenv.py F G1 G2 A P
    ^~~~~~~~~~~
[ stdin ]:9: 'printenv.py' not found
osh_.py8 Escaped = in command name

[osh_.py stdout] Expected 'HI\n', got ''
[osh_.py status] Expected 0, got 127

stdout:
stderr: 
  foo\=bar
  ^~~
[ stdin ]:1: 'foo=bar' not found
osh_.cc8 Escaped = in command name

[osh_.cc stdout] Expected 'HI\n', got ''
[osh_.cc status] Expected 0, got 127

stdout:
stderr: 
  foo\=bar
  ^~~
[ stdin ]:1: 'foo=bar' not found
osh_.py11 Empty env binding

[osh_.py stdout] Expected '\n', got ''
[osh_.py status] Expected 0, got 127

stdout:
stderr: 
  EMPTY= printenv.py EMPTY
         ^~~~~~~~~~~
[ stdin ]:1: 'printenv.py' not found
osh_.cc11 Empty env binding

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

stdout:
stderr: 
  EMPTY= printenv.py EMPTY
         ^~~~~~~~~~~
[ stdin ]:1: 'printenv.py' not found
osh_.py12 Assignment doesn't do word splitting

[osh_.py stdout] Expected "['one two']\n", got ''
[osh_.py status] Expected 0, got 127

stdout:
stderr: 
  argv.py "$a"
  ^~~~~~~
[ stdin ]:3: 'argv.py' not found
osh_.cc12 Assignment doesn't do word splitting

[osh_.cc stdout] Expected "['one two']\n", got ''
[osh_.cc status] Expected 0, got 127

stdout:
stderr: 
  argv.py "$a"
  ^~~~~~~
[ stdin ]:3: 'argv.py' not found
osh_.py13 Assignment doesn't do glob expansion

[osh_.py stdout] Expected "['_tmp/*.Z']\n", got ''
[osh_.py status] Expected 0, got 127

stdout:
stderr: 
  argv.py "$a"
  ^~~~~~~
[ stdin ]:3: 'argv.py' not found
osh_.cc13 Assignment doesn't do glob expansion

[osh_.cc stdout] Expected "['_tmp/*.Z']\n", got ''
[osh_.cc status] Expected 0, got 127

stdout:
stderr: 
  argv.py "$a"
  ^~~~~~~
[ stdin ]:3: 'argv.py' not found
osh_.py14 Env binding in readonly/declare is NOT exported! (pitfall)

[osh_.py stdout] Expected 'v=None\nv2=foo\n', got 'v=\nv2=foo\n'

stdout:
v=
v2=foo
stderr:
  FOO=foo readonly v=$(printenv.py FOO)
                       ^~~~~~~~~~~
[ stdin ]:1: 'printenv.py' not found
osh_.cc14 Env binding in readonly/declare is NOT exported! (pitfall)

[osh_.cc stdout] Expected 'v=None\nv2=foo\n', got ''
[osh_.cc status] Expected 0, got -6

stdout:
stderr: 
osh_eval.dbg: cpp/posix.h:106: Tuple2<int, int> posix::pipe(): Assertion `0' failed.
osh_.py17 readonly x= gives empty string (regression)

[osh_.py stdout] Expected "['']\n", got ''
[osh_.py status] Expected 0, got 127

stdout:
stderr: 
  argv.py "$x"
  ^~~~~~~
[ stdin ]:2: 'argv.py' not found
osh_.cc17 readonly x= gives empty string (regression)

[osh_.cc stdout] Expected "['']\n", got ''
[osh_.cc status] Expected 0, got 127

stdout:
stderr: 
  argv.py "$x"
  ^~~~~~~
[ stdin ]:2: 'argv.py' not found
osh_.py28 static assignment doesn't split

[osh_.py stdout] Expected "['a b c', 'a b c', 'a b c']\n", got ''
[osh_.py status] Expected 0, got 127

stdout:
stderr: 
  argv.py "$ex" "$glo" "$ro"
  ^~~~~~~
[ stdin ]:5: 'argv.py' not found
osh_.cc28 static assignment doesn't split

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

stdout:
stderr: 
  argv.py "$ex" "$glo" "$ro"
  ^~~~~~~
[ stdin ]:5: 'argv.py' not found
osh_.py29 aliased assignment doesn't split

[osh_.py stdout] Expected "['a b c', 'a b c']\n", got ''
[osh_.py status] Expected 0, got 127

stdout:
stderr: 
  argv.py "$ex" "$ro"
  ^~~~~~~
[ stdin ]:7: 'argv.py' not found
osh_.cc29 aliased assignment doesn't split

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

stdout:
stderr: 
  argv.py "$ex" "$ro"
  ^~~~~~~
[ stdin ]:7: 'argv.py' not found
osh_.py30 assignment using dynamic keyword (splits in most shells, not in zsh/osh)

[osh_.py stdout] Expected "['a b c', 'a b c']\n", got ''
[osh_.py status] Expected 0, got 127

stdout:
stderr: 
  argv.py "$ex" "$ro"
  ^~~~~~~
[ stdin ]:6: 'argv.py' not found
osh_.cc30 assignment using dynamic keyword (splits in most shells, not in zsh/osh)

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

stdout:
stderr: 
  argv.py "$ex" "$ro"
  ^~~~~~~
[ stdin ]:6: 'argv.py' not found
osh_.py31 assignment using dynamic var names doesn't split

[osh_.py stdout] Expected "['a b c', 'a b c']\n['a b c', 'a b c']\n", got ''
[osh_.py status] Expected 0, got 127

stdout:
stderr: 
  argv.py "$ex" "$ro"
  ^~~~~~~
[ stdin ]:6: 'argv.py' not found
  argv.py "$ex2" "$ro2"
  ^~~~~~~
[ stdin ]:11: 'argv.py' not found
osh_.cc31 assignment using dynamic var names doesn't split

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

stdout:
stderr: 
  argv.py "$ex" "$ro"
  ^~~~~~~
[ stdin ]:6: 'argv.py' not found
  argv.py "$ex2" "$ro2"
  ^~~~~~~
[ stdin ]:11: 'argv.py' not found
osh_.py32 assign and glob

[osh_.py stdout] Expected "['*']\n['*']\n", got ''

stdout:
stderr: 
  cd $TMP
  ^~
[ stdin ]:1: $HOME isn't defined
  argv.py "$foo"
  ^~~~~~~
[ stdin ]:4: 'argv.py' not found
  argv.py "$foo"
  ^~~~~~~
[ stdin ]:7: 'argv.py' not found
osh_.cc32 assign and glob

[osh_.cc stdout] Expected "['*']\n['*']\n", got ''

stdout:
stderr: 
  cd $TMP
  ^~
[ stdin ]:1: $HOME isn't defined
  argv.py "$foo"
  ^~~~~~~
[ stdin ]:4: 'argv.py' not found
  argv.py "$foo"
  ^~~~~~~
[ stdin ]:7: 'argv.py' not found
osh_.py33 declare and glob

[osh_.py stdout] Expected "['*']\n", got ''

stdout:
stderr: 
  cd $TMP
  ^~
[ stdin ]:1: $HOME isn't defined
  argv.py "$foo"
  ^~~~~~~
[ stdin ]:4: 'argv.py' not found
osh_.cc33 declare and glob

[osh_.cc stdout] Expected "['*']\n", got ''

stdout:
stderr: 
  cd $TMP
  ^~
[ stdin ]:1: $HOME isn't defined
  argv.py "$foo"
  ^~~~~~~
[ stdin ]:4: 'argv.py' not found
osh_.py36 export a=1 no_value c=2

[osh_.py stdout] Expected 'foo\n', got ''
[osh_.py status] Expected 0, got 127

stdout:
stderr: 
  printenv.py no_value
  ^~~~~~~~~~~
[ stdin ]:3: 'printenv.py' not found
osh_.cc36 export a=1 no_value c=2

[osh_.cc stdout] Expected 'foo\n', got ''
[osh_.cc status] Expected 0, got 127

stdout:
stderr: 
  printenv.py no_value
  ^~~~~~~~~~~
[ stdin ]:3: 'printenv.py' not found
osh_.py37 local a=loc $var c=loc

[osh_.py stdout] Expected "global\n['loc', '', 'loc']\n", got 'global\n'
[osh_.py status] Expected 0, got 127

stdout:
global
stderr:
    argv.py "$a" "$b" "$c"
    ^~~~~~~
[ stdin ]:6: 'argv.py' not found
osh_.cc37 local a=loc $var c=loc

[osh_.cc stdout] Expected "global\n['loc', '', 'loc']\n", got 'global\n'
[osh_.cc status] Expected 0, got 127

stdout:
global
stderr:
    argv.py "$a" "$b" "$c"
    ^~~~~~~
[ stdin ]:6: 'argv.py' not found
osh38 redirect after assignment builtin (what's going on with dash/bash/mksh here?)

[osh stderr] Expected 'STDERR\n', got ''

stdout:
done
stderr:
osh_.py38 redirect after assignment builtin (what's going on with dash/bash/mksh here?)

[osh_.py stderr] Expected 'STDERR\n', got ''

stdout:
done
stderr:
osh_.cc38 redirect after assignment builtin (what's going on with dash/bash/mksh here?)

[osh_.cc stdout] Expected 'done\n', got ''
[osh_.cc stderr] Expected 'STDERR\n', got "osh_eval.dbg: cpp/posix.h:143: void posix::dup2(int, int): Assertion `0' failed.\n"
[osh_.cc status] Expected 0, got -6

stdout:
stderr: 
osh_eval.dbg: cpp/posix.h:143: void posix::dup2(int, int): Assertion `0' failed.
osh39 redirect after command sub (like case above but without assignment builtin)

[osh stderr] Expected 'STDERR\n', got ''

stdout:
stdout=STDOUT
stderr:
osh_.py39 redirect after command sub (like case above but without assignment builtin)

[osh_.py stdout] Expected 'stdout=STDOUT\n', got 'stdout=\n'
[osh_.py stderr] Expected 'STDERR\n', got ''

stdout:
stdout=
stderr:
osh_.cc39 redirect after command sub (like case above but without assignment builtin)

[osh_.cc stdout] Expected 'stdout=STDOUT\n', got ''
[osh_.cc stderr] Expected 'STDERR\n', got "osh_eval.dbg: cpp/posix.h:143: void posix::dup2(int, int): Assertion `0' failed.\n"
[osh_.cc status] Expected 0, got -6

stdout:
stderr: 
osh_eval.dbg: cpp/posix.h:143: void posix::dup2(int, int): Assertion `0' failed.
osh_.cc40 redirect after bare assignment

[osh_.cc stdout] Expected 'done\n', got ''
[osh_.cc stderr] Expected u'', got "osh_eval.dbg: cpp/posix.h:143: void posix::dup2(int, int): Assertion `0' failed.\n"
[osh_.cc status] Expected 0, got -6

stdout:
stderr: 
osh_eval.dbg: cpp/posix.h:143: void posix::dup2(int, int): Assertion `0' failed.
osh41 redirect after declare -p

stdout:
stderr: 
declare -- foo=bar
osh_.py41 redirect after declare -p

stdout:
stderr: 
declare -- foo=bar
osh_.cc41 redirect after declare -p

[osh_.cc stderr] Expected 'declare -- foo=bar\n', got "osh_eval.dbg: cpp/posix.h:143: void posix::dup2(int, int): Assertion `0' failed.\n"
[osh_.cc status] Expected 0, got -6

stdout:
stderr: 
osh_eval.dbg: cpp/posix.h:143: void posix::dup2(int, int): Assertion `0' failed.