spec test index / oilshell.org
62 passed, 15 OK, 26 not implemented, 4 BUG, 1 failed, 0 timeouts, 0 cases skipped
mksh | 0 local -a stdout: stderr: mksh: <stdin>[2]: syntax error: '(' unexpected |
mksh | 1 declare -a stdout: stderr: mksh: <stdin>[1]: syntax error: '(' unexpected |
osh | 2 indexed LHS with spaces (not allowed in OSH) stdout: status=127 []stderr: a[1 * 1]=x a[ 1 + 2 ]=z ^~ [ stdin ]:1: 'a[1' not found (OILS-ERR-100) |
mksh | 3 declare -f exit code indicates function existence stdout: 127 127 127stderr: mksh: <stdin>[2]: declare: not found mksh: <stdin>[6]: declare: not found mksh: <stdin>[10]: declare: not found |
mksh | 4 declare -F prints function names stdout: stderr: mksh: <stdin>[7]: declare: not found |
mksh | 5 declare -p var (exit status) stdout: 127 127 127stderr: mksh: <stdin>[2]: declare: not found mksh: <stdin>[6]: declare: not found mksh: <stdin>[10]: declare: not found |
bash-4 | 6 declare stdout: [declare] test_var1=111 test_var2=222 test_var3=333 test_var4=test_var1 test_var5=555 [readonly] declare -r test_var2="222" [export] declare -x test_var3="333" [local] test_var5=555stderr: |
mksh | 6 declare stdout: [declare] [readonly] test_var2 [export] test_var3 [local] typeset test_var1 typeset -r test_var2 typeset -x test_var3 typeset test_var5stderr: mksh: <stdin>[4]: declare: not found mksh: <stdin>[18]: declare: not found |
bash-4 | 7 declare -p stdout: [declare] declare -- test_var1="111" declare -r test_var2="222" declare -x test_var3="333" declare -n test_var4="test_var1" declare -- test_var5="555" [readonly] declare -r test_var2="222" [export] declare -x test_var3="333" [local] test_var5=555stderr: |
mksh | 7 declare -p stdout: [declare] [readonly] readonly test_var2=222 [export] export test_var3=333 [local] typeset test_var1=111 typeset -r test_var2=222 typeset -x test_var3=333 typeset test_var5=555stderr: mksh: <stdin>[4]: declare: not found mksh: <stdin>[18]: declare: not found |
bash-4 | 8 declare -p doesn't print binary data, but can be loaded into bash stdout: stderr: |
mksh | 8 declare -p doesn't print binary data, but can be loaded into bash stdout: stderr: |
bash-4 | 9 declare -p var stdout: [declare] declare -- test_var1="111" declare -r test_var2="222" declare -x test_var3="333" declare -n test_var4="test_var1" declare -- test_var5="555" [readonly] [export] [local]stderr: main: line 9: declare: test_var0: not found main: line 15: local: test_var0: readonly variable main: line 15: local: test_var1: readonly variable main: line 15: local: test_var2: readonly variable main: line 15: local: test_var3: readonly variable |
mksh | 9 declare -p var stdout: [declare] [readonly]stderr: mksh: <stdin>[4]: declare: not found mksh: <stdin>[18]: declare: not found mksh: <stdin>[18]: readonly: test_var{0..5}: is not an identifier |
bash-4 | 10 declare -p arr stdout: declare -a test_arr1=() declare -a test_arr2=() declare -A test_arr3=() declare -a test_arr4=([0]="1" [1]="2" [2]="3") declare -a test_arr5=([0]="1" [1]="2" [2]="3") declare -A test_arr6=([a]="1" [b]="2" [c]="3" ) declare -a test_arr7=([3]="foo")stderr: |
mksh | 10 declare -p arr stdout: stderr: mksh: <stdin>[2]: syntax error: '(' unexpected |
mksh | 11 declare -p foo=bar doesn't make sense stdout: stderr: |
bash-4 | 12 declare -pnrx stdout: [declare -pn] declare -n test_var4="test_var1" [declare -pr] declare -r test_var2="222" [declare -px] declare -x test_var3="333"stderr: |
mksh | 12 declare -pnrx stdout: [declare -pn] [declare -pr] [declare -px]stderr: mksh: <stdin>[4]: declare: not found mksh: <stdin>[16]: declare: not found mksh: <stdin>[16]: declare: not found mksh: <stdin>[16]: declare: not found |
bash-4 | 13 declare -paA stdout: [declare -pa] declare -a test_var6=() [declare -pA] declare -A test_var7=()stderr: |
mksh | 13 declare -paA stdout: stderr: mksh: <stdin>[1]: syntax error: '(' unexpected |
bash-4 | 14 declare -pnrx var stdout: [declare -pn] declare -- test_var1="111" declare -r test_var2="222" declare -x test_var3="333" declare -n test_var4="test_var1" declare -- test_var5="555" [declare -pr] declare -- test_var1="111" declare -r test_var2="222" declare -x test_var3="333" declare -n test_var4="test_var1" declare -- test_var5="555" [declare -px] declare -- test_var1="111" declare -r test_var2="222" declare -x test_var3="333" declare -n test_var4="test_var1" declare -- test_var5="555"stderr: main: line 9: declare: test_var0: not found main: line 11: declare: test_var0: not found main: line 13: declare: test_var0: not found |
mksh | 14 declare -pnrx var stdout: [declare -pn] [declare -pr] [declare -px]stderr: mksh: <stdin>[4]: declare: not found mksh: <stdin>[16]: declare: not found mksh: <stdin>[16]: declare: not found mksh: <stdin>[16]: declare: not found |
bash-4 | 15 declare -pg stdout: declare -- test_var1="local"stderr: |
mksh | 15 declare -pg stdout: stderr: mksh: <stdin>[8]: declare: not found |
bash-4 | 16 declare -pg var stdout: declare -- test_var1="local"stderr: |
mksh | 16 declare -pg var stdout: stderr: mksh: <stdin>[8]: declare: not found |
mksh | 17 ble.sh: eval -- "$(declare -p var arr)" stdout: stderr: mksh: <stdin>[3]: syntax error: '(' unexpected |
mksh | 18 eval -- "$(declare -p arr)" (restore arrays w/ unset elements) stdout: stderr: mksh: <stdin>[2]: declare: not found mksh: <stdin>[5]: {0..4}: unexpected '{' |
mksh | 20 typeset -p stdout: 0 0 0stderr: |
bash-4 | 21 typeset -r makes a string readonly stdout: status=1 status=1 status=1 status=1 status=1 status=1stderr: bash-4.4: line 4: s1: readonly variable bash-4.4: line 6: s2: readonly variable bash-4.4: line 9: s1: readonly variable bash-4.4: line 11: s2: readonly variable bash-4.4: line 14: unset: s1: cannot unset: readonly variable bash-4.4: line 16: unset: s2: cannot unset: readonly variable |
mksh | 21 typeset -r makes a string readonly stdout: stderr: mksh: <stdin>[4]: read-only: s1 |
bash-4 | 22 typeset -ar makes it readonly stdout: status=1 status=1 status=1 status=1 status=1 status=1stderr: bash-4.4: line 4: array1: readonly variable bash-4.4: line 6: array2: readonly variable bash-4.4: line 9: array1: readonly variable bash-4.4: line 11: array2: readonly variable bash-4.4: line 14: unset: array1: cannot unset: readonly variable bash-4.4: line 16: unset: array2: cannot unset: readonly variable |
mksh | 22 typeset -ar makes it readonly stdout: stderr: mksh: <stdin>[1]: syntax error: '(' unexpected |
bash-4 | 25 Env bindings shouldn't contain array assignments stdout: 1 None 3stderr: |
mksh | 25 Env bindings shouldn't contain array assignments stdout: 1 2 3stderr: |
bash-4 | 26 syntax error in array assignment stdout: xstderr: bash-4.4: line 1: 0+: syntax error: operand expected (error token is "+") |
mksh | 26 syntax error in array assignment stdout: stderr: mksh: <stdin>[1]: 0+: unexpected 'end of expression' |
mksh | 27 declare -g (bash-specific; bash-completion uses it) stdout: ['', '']stderr: mksh: <stdin>[14]: declare: not found mksh: <stdin>[14]: declare: not found mksh: <stdin>[14]: declare: not found mksh: <stdin>[14]: "foo": unexpected '"' mksh: <stdin>[16]: "foo": unexpected '"' |
osh | 28 myvar=typeset (another form of dynamic assignment) stdout: a bstderr: |
bash-4 | 29 dynamic array parsing is not allowed stdout: status=0 ['1']stderr: |
mksh | 29 dynamic array parsing is not allowed stdout: status=0 ['(1 2 3)']stderr: |
bash-4 | 32 typeset +r removes read-only attribute (TODO: documented in bash to do nothing) stdout: r=r1 r=r1 r=r1stderr: bash-4.4: line 4: typeset: r: readonly variable bash-4.4: line 7: r: readonly variable |
mksh | 32 typeset +r removes read-only attribute (TODO: documented in bash to do nothing) stdout: r=r1stderr: mksh: <stdin>[4]: read-only: r |
mksh | 33 function name with / stdout: status=127stderr: mksh: <stdin>[2]: declare: not found |
mksh | 35 unset and shell funcs [mksh stdout] Expected 'bar\ndeclare -f foo\n', got 'bar\nbar\n' [mksh status] Expected 127, got 0 stdout: bar barstderr: mksh: <stdin>[7]: declare: not found mksh: <stdin>[9]: declare: not found |