Results for ysh-env.test.sh

statusoshosh-cpp
pass 33
FAIL 44
total77
caseoshosh-cppdescription
0pass pass Can read from ENV Dict
1FAIL FAIL YSH doesn't have exported vars (declare -x)
detailsdetails
2pass pass Temp bindings A=a B=b my-command push to ENV dict
3FAIL FAIL setglobal ENV.PYTHONPATH = 'foo' changes child process state
detailsdetails
4pass pass export builtin still works
5FAIL FAIL PS4 environment variable is respected
detailsdetails
6FAIL FAIL ENV works in different modules
detailsdetails
6 passed, 0 OK, 0 not implemented, 0 BUG, 4 failed, 0 timeouts, 0 cases skipped
4 failed under osh

Details on runs that didn't PASS

osh1 YSH doesn't have exported vars (declare -x)

[osh stdout] Expected 'OSH ok\nsh=null\n', got 'OSH ok\nsh=/home/uke/oil/bin/osh\n'

stdout:
OSH ok
sh=/home/uke/oil/bin/osh
stderr:
osh-cpp1 YSH doesn't have exported vars (declare -x)

[osh-cpp stdout] Expected 'OSH ok\nsh=null\n', got 'OSH ok\nsh=/home/uke/oil/_bin/cxx-asan/osh\n'

stdout:
OSH ok
sh=/home/uke/oil/_bin/cxx-asan/osh
stderr:
osh3 setglobal ENV.PYTHONPATH = 'foo' changes child process state

[osh stdout] Expected '', got '(Dict) {"TMP":"/home/uke/oil/_tmp/spec-tmp/ysh-env.test.sh.29597/03-osh","REPO_ROOT":"/home/uke/oil","PYTHONPATH":"foo","PWD":"/home/uke/oil/_tmp/spec-tmp/ysh-env.test.sh.29597/03-osh","SH":"/home/uke/oil/bin/osh","LC_ALL":"C.UTF-8","PATH":"/home/uke/oil/test/../spec/bin:/wedge/oils-for-unix.org/pkg/re2c/3.0/bin:/wedge/oils-for-unix.org/pkg/python3/3.10.4/bin:/wedge/oils-for-unix.org/pkg/re2c/3.0/bin:/wedge/oils-for-unix.org/pkg/python3/3.10.4/bin:/wedge/oils-for-unix.org/pkg/re2c/3.0/bin:/wedge/oils-for-unix.org/pkg/python3/3.10.4/bin:/wedge/oils-for-unix.org/pkg/re2c/3.0/bin:/wedge/oils-for-unix.org/pkg/python3/3.10.4/bin:/wedge/oils-for-unix.org/pkg/re2c/3.0/bin:/wedge/oils-for-unix.org/pkg/python3/3.10.4/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin","LOCALE_ARCHIVE":"","OILS_GC_ON_EXIT":"1"}\npythonpath=/home/uke/oil:/home/uke/oil/vendor\n'

stdout:
(Dict)   {"TMP":"/home/uke/oil/_tmp/spec-tmp/ysh-env.test.sh.29597/03-osh","REPO_ROOT":"/home/uke/oil","PYTHONPATH":"foo","PWD":"/home/uke/oil/_tmp/spec-tmp/ysh-env.test.sh.29597/03-osh","SH":"/home/uke/oil/bin/osh","LC_ALL":"C.UTF-8","PATH":"/home/uke/oil/test/../spec/bin:/wedge/oils-for-unix.org/pkg/re2c/3.0/bin:/wedge/oils-for-unix.org/pkg/python3/3.10.4/bin:/wedge/oils-for-unix.org/pkg/re2c/3.0/bin:/wedge/oils-for-unix.org/pkg/python3/3.10.4/bin:/wedge/oils-for-unix.org/pkg/re2c/3.0/bin:/wedge/oils-for-unix.org/pkg/python3/3.10.4/bin:/wedge/oils-for-unix.org/pkg/re2c/3.0/bin:/wedge/oils-for-unix.org/pkg/python3/3.10.4/bin:/wedge/oils-for-unix.org/pkg/re2c/3.0/bin:/wedge/oils-for-unix.org/pkg/python3/3.10.4/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin","LOCALE_ARCHIVE":"","OILS_GC_ON_EXIT":"1"}
pythonpath=/home/uke/oil:/home/uke/oil/vendor
stderr:
osh-cpp3 setglobal ENV.PYTHONPATH = 'foo' changes child process state

[osh-cpp stdout] Expected '', got '(Dict) {"TMP":"/home/uke/oil/_tmp/spec-tmp/ysh-env.test.sh.29597/03-osh-cpp","REPO_ROOT":"/home/uke/oil/test/..","SH":"/home/uke/oil/_bin/cxx-asan/osh","LC_ALL":"C.UTF-8","PATH":"/home/uke/oil/test/../spec/bin:/wedge/oils-for-unix.org/pkg/re2c/3.0/bin:/wedge/oils-for-unix.org/pkg/python3/3.10.4/bin:/wedge/oils-for-unix.org/pkg/re2c/3.0/bin:/wedge/oils-for-unix.org/pkg/python3/3.10.4/bin:/wedge/oils-for-unix.org/pkg/re2c/3.0/bin:/wedge/oils-for-unix.org/pkg/python3/3.10.4/bin:/wedge/oils-for-unix.org/pkg/re2c/3.0/bin:/wedge/oils-for-unix.org/pkg/python3/3.10.4/bin:/wedge/oils-for-unix.org/pkg/re2c/3.0/bin:/wedge/oils-for-unix.org/pkg/python3/3.10.4/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin","LOCALE_ARCHIVE":"","OILS_GC_ON_EXIT":"1","LINES":"24","COLUMNS":"80","PYTHONPATH":"foo"}\npythonpath=\n'

stdout:
(Dict)   {"TMP":"/home/uke/oil/_tmp/spec-tmp/ysh-env.test.sh.29597/03-osh-cpp","REPO_ROOT":"/home/uke/oil/test/..","SH":"/home/uke/oil/_bin/cxx-asan/osh","LC_ALL":"C.UTF-8","PATH":"/home/uke/oil/test/../spec/bin:/wedge/oils-for-unix.org/pkg/re2c/3.0/bin:/wedge/oils-for-unix.org/pkg/python3/3.10.4/bin:/wedge/oils-for-unix.org/pkg/re2c/3.0/bin:/wedge/oils-for-unix.org/pkg/python3/3.10.4/bin:/wedge/oils-for-unix.org/pkg/re2c/3.0/bin:/wedge/oils-for-unix.org/pkg/python3/3.10.4/bin:/wedge/oils-for-unix.org/pkg/re2c/3.0/bin:/wedge/oils-for-unix.org/pkg/python3/3.10.4/bin:/wedge/oils-for-unix.org/pkg/re2c/3.0/bin:/wedge/oils-for-unix.org/pkg/python3/3.10.4/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin","LOCALE_ARCHIVE":"","OILS_GC_ON_EXIT":"1","LINES":"24","COLUMNS":"80","PYTHONPATH":"foo"}
pythonpath=
stderr:
osh5 PS4 environment variable is respected

[osh stdout] Expected 'TODO\n', got '1\n2\n'

stdout:
1
2
stderr:
+ echo 1
+ echo 2
osh-cpp5 PS4 environment variable is respected

[osh-cpp stdout] Expected 'TODO\n', got '1\n2\n'

stdout:
1
2
stderr:
+ echo 1
+ echo 2
osh6 ENV works in different modules

[osh stdout] Expected 'TODO\n', got 'env.ysh\n'
[osh status] Expected 0, got 1

stdout:
env.ysh
stderr:
  if (ENV.SH ~~ '*osh') {
      ^~~
/home/uke/oil/spec/testdata/module2/env.ysh:4: fatal: Undefined variable 'ENV'
  use $[ENV.REPO_ROOT]/spec/testdata/module2/env.ysh
  ^~~
[ stdin ]:5: errexit PID 29817: command.Simple failed with status 1
osh-cpp6 ENV works in different modules

[osh-cpp stdout] Expected 'TODO\n', got 'env.ysh\n'
[osh-cpp status] Expected 0, got 1

stdout:
env.ysh
stderr:
  if (ENV.SH ~~ '*osh') {
      ^~~
/home/uke/oil/test/../spec/testdata/module2/env.ysh:4: fatal: Undefined variable 'ENV'
  use $[ENV.REPO_ROOT]/spec/testdata/module2/env.ysh
  ^~~
[ stdin ]:5: errexit PID 29826: command.Simple failed with status 1