Results for oil-expr.test.sh

statusoshosh-cpp
pass 524
FAIL 149
total5353
caseoshosh-cppdescription
0pass FAIL command sub $(echo hi)
details
1pass FAIL shell array %(a 'b c')
details
2pass FAIL empty array and simple_word_eval (regression test)
details
3pass pass Empty array and assignment builtin (regression)
4pass FAIL Shell arrays support tilde detection, static globbing, brace detection
details
5pass FAIL augmented assignment doesn't work on shell arrays
details
6pass FAIL Set $HOME using 'var' (i.e. Oil string var in word evaluator)
details
7pass FAIL Use shell var in Oil expression
details
8pass FAIL Length in two different contexts
details
9pass FAIL $len(x) inside strings
details
10pass FAIL Func with multiple args in multiple contexts
details
11pass FAIL Trailing Comma in Param list
details
12pass FAIL nested expr contexts
details
13pass pass Test value.Obj inside shell arithmetic
14pass FAIL Parse { var x = 42 }
details
15pass FAIL double quoted
details
16pass FAIL double quoted respects strict_array
details
17pass FAIL simple var sub $name $0 $1 $? etc.
details
18pass FAIL braced var sub ${x:-default}
details
19pass FAIL braced var sub respects strict_array
details
20pass FAIL null / true / false
details
21pass FAIL Integer literals
details
22pass FAIL Integer literals with underscores
details
23pass FAIL Backslash char literal (is an integer)
details
24pass FAIL \u{3bc} is char literal
details
25pass FAIL Pound char literal (is an integer)
details
26pass pass The literal #''' isn't accepted (use \' instead)
27pass FAIL Float Literals
details
28FAIL FAIL Float Literals with _ (requires re2c refinement)
detailsdetails
29pass FAIL Tuples
details
30pass FAIL in, not in
details
31pass FAIL dict with 'bare word' keys
details
32pass FAIL dict with expression keys
details
33pass FAIL dict literal with implicit value
details
34pass FAIL Dict literal with string keys
details
35pass FAIL Bitwise logical
details
36pass FAIL Shift operators
details
37pass FAIL Exponentiation with **
details
38pass FAIL Two Kinds of Division
details
39pass FAIL mod operator
details
40pass FAIL Logical operators
details
41pass FAIL x if b else y
details
42pass FAIL multiline strings, list, tuples, etc.
details
43pass FAIL multiline dict
details
44pass FAIL multiline array and command sub (only here docs disallowed)
details
45pass FAIL obj.attr and obj.method()
details
46pass pass obj.method does NOT give you a bound method
47pass FAIL d->key
details
48pass FAIL a ++ b for string/list concatenation
details
49pass FAIL s ~~ glob and s !~~ glob
details
50pass FAIL Type Errors
details
51pass FAIL can't use ++ on integers
details
52pass FAIL can't do mystr ++ mylist
details
56 passed, 0 OK, 0 not implemented, 0 BUG, 50 failed, 0 timeouts, 0 cases skipped
1 failed under osh

Details on runs that didn't PASS

osh-cpp0 command sub $(echo hi)

[osh-cpp stdout] Expected 'x=hi y=default\n', got 'x=default y=default\n'

stdout:
x=default y=default
stderr:
osh-cpp1 shell array %(a 'b c')

[osh-cpp stdout] Expected "['/', 'a', 'b c', '/']\n", got ''
[osh-cpp status] Expected 0, got 1

stdout:
stderr: 
  argv.py / @x @empty /
            ^~
[ stdin ]:4: fatal: Can't splice 'x'
osh-cpp2 empty array and simple_word_eval (regression test)

[osh-cpp stdout] Expected "len=0\n['/', '/']\n", got 'len=0\n'
[osh-cpp status] Expected 0, got 1

stdout:
len=0
stderr:
  argv.py / @empty /
            ^~~~~~
[ stdin ]:4: fatal: Can't splice 'empty'
osh-cpp4 Shell arrays support tilde detection, static globbing, brace detection

[osh-cpp stdout] Expected "['/home/bob/src', 'bar.py', 'foo.py', 'andy@example.com', 'bob@example.com', '*.py']\n" Got ''
[osh-cpp status] Expected 0, got 1

stdout:
stderr: 
  argv.py @x
          ^~
[ stdin ]:7: fatal: Can't splice 'x'
osh-cpp5 augmented assignment doesn't work on shell arrays

[osh-cpp stdout] Expected "['a', 'b c']\n", got ''

stdout:
stderr: 
  argv.py @x
          ^~
[ stdin ]:3: fatal: Can't splice 'x'
osh-cpp6 Set $HOME using 'var' (i.e. Oil string var in word evaluator)

[osh-cpp stdout] Expected 'foo\nfoo\n', got '\n/home/andy\n'

stdout:
/home/andy
stderr:
osh-cpp7 Use shell var in Oil expression

[osh-cpp stdout] Expected '3\n', got '\n'

stdout:
stderr: 
osh-cpp8 Length in two different contexts

[osh-cpp stdout] Expected 'shell=5\noil=21\n', got 'shell=5\noil=\n'

stdout:
shell=5
oil=
stderr:
osh-cpp9 $len(x) inside strings

[osh-cpp stdout] Expected '-3-\n', got '--\n'

stdout:
--
stderr:
osh-cpp10 Func with multiple args in multiple contexts

[osh-cpp stdout] Expected '7 7\n', got '\n'

stdout:
stderr: 
osh-cpp11 Trailing Comma in Param list

[osh-cpp stdout] Expected '7 7\n', got '\n'

stdout:
stderr: 
osh-cpp12 nested expr contexts

[osh-cpp stdout] Expected 'len 3\n', got '\n'

stdout:
stderr: 
osh-cpp14 Parse { var x = 42 }

[osh-cpp stdout] Expected 'x=1\n', got ''
[osh-cpp status] Expected 0, got 1

stdout:
stderr: 
  echo x=$x
         ^~
[ stdin ]:7: fatal: Undefined variable 'x'
osh-cpp15 double quoted

[osh-cpp stdout] Expected '-bar-bar-default-\n', got '\n'

stdout:
stderr: 
osh-cpp16 double quoted respects strict_array

[osh-cpp stdout] Expected u'', got '\n'
[osh-cpp status] Expected 1, got 0

stdout:
stderr: 
osh-cpp17 simple var sub $name $0 $1 $? etc.

[osh-cpp stdout] Expected 'status=42\na b\nnamed=a\n', got 'status=\n\nnamed=\n'

stdout:
status=

named=
stderr:
osh-cpp18 braced var sub ${x:-default}

[osh-cpp stdout] Expected 'default\n-default-\n--default--\n', got '\n\n\n'

stdout:


stderr:
osh-cpp19 braced var sub respects strict_array

[osh-cpp stdout] Expected 'a b c\n', got '\n\n'
[osh-cpp status] Expected 1, got 0

stdout:

stderr:
osh-cpp20 null / true / false

[osh-cpp stdout] Expected 'no\nyes\nno\n', got 'no\nno\nno\n'

stdout:
no
no
no
stderr:
osh-cpp21 Integer literals

[osh-cpp stdout] Expected '123 3 83 255\n', got '\n'

stdout:
stderr: 
osh-cpp22 Integer literals with underscores

[osh-cpp stdout] Expected 'SHELL\n65536\n21\n1005\n65551\nsum 40\n', got 'SHELL\n\n\n\n\nsum\n'

stdout:
SHELL




sum
stderr:
osh-cpp23 Backslash char literal (is an integer)

[osh-cpp stdout] Expected '10 92 39 34\n', got ' \n'

stdout:
   
stderr:
osh-cpp24 \u{3bc} is char literal

[osh-cpp stdout] Expected 'yes\nmu 956\n', got ''
[osh-cpp status] Expected 0, got 1

stdout:
stderr: 
  echo "mu $mu"
           ^~~
[ stdin ]:7: fatal: Undefined variable 'mu'
osh-cpp25 Pound char literal (is an integer)

[osh-cpp stdout] Expected '97 65\n', got ' \n'

stdout:
 
stderr:
osh-cpp27 Float Literals

[osh-cpp stdout] Expected 'less\ngreat\n', got ''

stdout:
stderr: 
osh28 Float Literals with _ (requires re2c refinement)

[osh stdout] Expected 'less\ngreat\n', got ''
[osh status] Expected 0, got 2

stdout:
stderr: 
  var x = 1.2 + 2_3.0e-1  # 3.5
                    ^~~~
[ stdin ]:2: Syntax error in expression (near Id.Expr_Float)
osh-cpp28 Float Literals with _ (requires re2c refinement)

[osh-cpp stdout] Expected 'less\ngreat\n', got ''
[osh-cpp status] Expected 0, got 2

stdout:
stderr: 
  var x = 1.2 + 2_3.0e-1  # 3.5
                    ^~~~
[ stdin ]:2: Syntax error in expression (near Id.Expr_Float)
osh-cpp29 Tuples

[osh-cpp stdout] Expected '0\n1\n2\n', got '\n\n\n'

stdout:


stderr:
osh-cpp30 in, not in

[osh-cpp stdout] Expected 'true\nfalse\ntrue\n', got '\n\n\n'

stdout:


stderr:
osh-cpp31 dict with 'bare word' keys

[osh-cpp stdout] Expected 'len=0\nlen=1\nlen=2\n', got 'len=\nlen=\nlen=\n'

stdout:
len=
len=
len=
stderr:
osh-cpp32 dict with expression keys

[osh-cpp stdout] Expected 'len=1\nhello\nlen=1\nbar\n', got 'len=\n\nlen=\n\n'

stdout:
len=

len=

stderr:
osh-cpp33 dict literal with implicit value

[osh-cpp stdout] Expected 'len=1\nfoo\nlen=2\nfoo\n', got 'len=\n\nlen=\n\n'

stdout:
len=

len=

stderr:
osh-cpp34 Dict literal with string keys

[osh-cpp stdout] Expected '123\n456\n', got '\n\n'

stdout:

stderr:
osh-cpp35 Bitwise logical

[osh-cpp stdout] Expected '1\n7\n6\n-8\n', got '\n\n\n\n'

stdout:



stderr:
osh-cpp36 Shift operators

[osh-cpp stdout] Expected '16\n1\n', got '\n\n'

stdout:

stderr:
osh-cpp37 Exponentiation with **

[osh-cpp stdout] Expected '8\n', got '\nshould not get here\n'
[osh-cpp status] Expected 3, got 0

stdout:
should not get here
stderr:
osh-cpp38 Two Kinds of Division

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

stdout:

stderr:
osh-cpp39 mod operator

[osh-cpp stdout] Expected '(Int) 2\n(Int) 1\n', got ''

stdout:
stderr: 
osh-cpp40 Logical operators

[osh-cpp stdout] Expected 'false\nfalse\ntrue\n', got '\n\n\n'

stdout:


stderr:
osh-cpp41 x if b else y

[osh-cpp stdout] Expected '43\n41\n', got '\n\n'

stdout:

stderr:
osh-cpp42 multiline strings, list, tuples, etc.

[osh-cpp stdout] Expected 'dq=6\nsq=6\nmylist=3\nmytuple=3\n', got 'dq=\nsq=\n'
[osh-cpp status] Expected 0, got 2

stdout:
dq=
sq=
stderr:
  var mylist = [
                ^
[ stdin ]:13: Syntax error in expression (near Id.Op_Newline)
osh-cpp43 multiline dict

[osh-cpp stdout] Expected 'mydict=2\n', got 'mydict=\n'

stdout:
mydict=
stderr:
osh-cpp44 multiline array and command sub (only here docs disallowed)

[osh-cpp stdout] Expected 'array=3\ncomsub=6\n', got 'array=\ncomsub=\n'

stdout:
array=
comsub=
stderr:
osh-cpp45 obj.attr and obj.method()

[osh-cpp stdout] Expected 'HI\n', got '\n'

stdout:
stderr: 
osh-cpp47 d->key

[osh-cpp stdout] Expected 'andy\n', got '\n'

stdout:
stderr: 
osh-cpp48 a ++ b for string/list concatenation

[osh-cpp stdout] Expected 'abcde\nlen=3\n', got '\nlen=\n'

stdout:
len=
stderr:
osh-cpp49 s ~~ glob and s !~~ glob

[osh-cpp stdout] Expected 'yes\nno\n', got ''

stdout:
stderr: 
osh-cpp50 Type Errors

[osh-cpp stdout] Expected '3\n3\n3\n3\n', got '\n\n\n\n'

stdout:



stderr:
osh-cpp51 can't use ++ on integers

[osh-cpp stdout] Expected '', got '\n'
[osh-cpp status] Expected 3, got 0

stdout:
stderr: 
osh-cpp52 can't do mystr ++ mylist

[osh-cpp status] Expected 3, got 0

stdout:
stderr: