Results for ysh-regex.test.sh

statusoshosh_ALT
pass 4141
FAIL 44
total4545
caseoshosh_ALTdescription
0pass pass /^.$/
1pass pass /.+/
2pass pass Positional captures with _match
3pass pass s ~ regex and s !~ regex
4FAIL FAIL _start() and _end()
detailsdetails
5pass pass Repeat {1,3} etc.
6pass pass d+ digit+ !d+ !digit+
7pass pass Alternation and sequence
8pass pass Char Class Ranges
9pass pass Char Class Set
10pass pass Range with escaped characters
11pass pass Group ()
12pass pass Capture is acceptable as a group
13FAIL FAIL Named captures with _match
detailsdetails
14pass pass Named Capture Decays Without Name
15FAIL FAIL Operator ~ assigns named variable
detailsdetails
16pass pass literal ''
17pass pass Single quotes and splicing (do what "foo $x ${x}" used to)
18pass pass @splice
19pass pass splice with capital letters
20pass pass Matching escaped tab character
21pass pass Match unicode char
22FAIL FAIL Match non-ASCII byte denoted using $'\xff' (TODO: LANG=C)
detailsdetails
23pass pass Match non-ASCII byte denoted using \xff
24pass pass ERE can express Unicode escapes that are in the ASCII range
25pass pass ERE can't express higher Unicode escapes
26pass pass non-ASCII bytes must be singleton terms, e.g. '\x7f\xff' is disallowed
27pass pass Matching escaped tab character
28pass pass Repeated String Literal With Single Char
29pass pass Error when unparenthesized string of more than one character is repeated
30pass pass Instead of $'foo\\bar' use 'foo' \\ 'bar'
31pass pass Negation of Character Class ![a-z]
32pass pass Posix and Perl class in class literals
33pass pass [!d] can't be negated because it's a literal character
34pass pass [!digit] can't be negated in POSIX ERE (but yes in Perl)
35pass pass Long Python Example
36pass pass Invalid sh operation on eggex
37pass pass Regex in a loop (bug regression)
38pass pass Regex in a loop depending on var
39pass pass Regex with [ (bug regression)
40pass pass Operator chars in char classes (bash-like)
41pass pass Operator chars in char classes (eggex)
42pass pass Matching ] and \ and ' and " in character classes
43pass pass Matching literal hyphen in character classes
44pass pass Char class special: ^ - ] \
82 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

osh4 _start() and _end()

[osh stdout] Expected 'start=3 end=6\nstart=3 end=6\n', got ''
[osh status] Expected 0, got 1
[osh stderr] Found 'Traceback (most recent'

stdout:
stderr: 
Traceback (most recent call last):
  File "/home/andy/git/oilshell/oil/bin/oils_for_unix.py", line 224, in <module>
    sys.exit(main(sys.argv))
  File "/home/andy/git/oilshell/oil/bin/oils_for_unix.py", line 199, in main
    return AppBundleMain(argv)
  File "/home/andy/git/oilshell/oil/bin/oils_for_unix.py", line 146, in AppBundleMain
    return shell.Main('osh', arg_r, environ, login_shell, loader, readline)
  File "/home/andy/git/oilshell/oil/core/shell.py", line 925, in Main
    cmd_flags=cmd_eval.IsMainProgram)
  File "/home/andy/git/oilshell/oil/core/main_loop.py", line 348, 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 1859, in ExecuteAndCatch
    status = self._Execute(node)
  File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 1681, in _Execute
    status = self._Dispatch(node, cmd_st)
  File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 1520, in _Dispatch
    status = self._ExecuteList(if_arm.action)
  File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 1764, in _ExecuteList
    status = self._Execute(child)
  File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 1681, in _Execute
    status = self._Dispatch(node, cmd_st)
  File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 756, in _Dispatch
    allow_assign=True)
  File "/home/andy/git/oilshell/oil/osh/word_eval.py", line 2152, in EvalWordSequence2
    return self.SimpleEvalWordSequence2(words, allow_assign)
  File "/home/andy/git/oilshell/oil/osh/word_eval.py", line 2112, in SimpleEvalWordSequence2
    self._EvalWordToParts(w, part_vals, 0)  # not quoted
  File "/home/andy/git/oilshell/oil/osh/word_eval.py", line 1704, in _EvalWordToParts
    self._EvalWordPart(p, word_part_vals, eval_flags)
  File "/home/andy/git/oilshell/oil/osh/word_eval.py", line 1661, in _EvalWordPart
    part_val = self.expr_ev.EvalExprSub(part)
  File "/home/andy/git/oilshell/oil/ysh/expr_eval.py", line 212, in EvalExprSub
    val = self.EvalExpr(part.child, loc.Missing)
  File "/home/andy/git/oilshell/oil/ysh/expr_eval.py", line 238, in EvalExpr
    val = self._EvalExpr(node)
  File "/home/andy/git/oilshell/oil/ysh/expr_eval.py", line 1226, in _EvalExpr
    return self._EvalFuncCall(node)
  File "/home/andy/git/oilshell/oil/ysh/expr_eval.py", line 950, in _EvalFuncCall
    ret = f(*pos_args)
  File "/home/andy/git/oilshell/oil/library/func_eggex.py", line 53, in __call__
    raise NotImplementedError('_start')
NotImplementedError: _start
osh_ALT4 _start() and _end()

[osh_ALT stdout] Expected 'start=3 end=6\nstart=3 end=6\n', got ''
[osh_ALT status] Expected 0, got 1
[osh_ALT stderr] Found 'Traceback (most recent'

stdout:
stderr: 
Traceback (most recent call last):
  File "/home/andy/git/oilshell/oil/bin/oil.py", line 34, in _cpython_main_hook
    sys.exit(oils_for_unix.main(sys.argv))
  File "/home/andy/git/oilshell/oil/bin/oils_for_unix.py", line 199, in main
    return AppBundleMain(argv)
  File "/home/andy/git/oilshell/oil/bin/oils_for_unix.py", line 146, in AppBundleMain
    return shell.Main('osh', arg_r, environ, login_shell, loader, readline)
  File "/home/andy/git/oilshell/oil/core/shell.py", line 925, in Main
    cmd_flags=cmd_eval.IsMainProgram)
  File "/home/andy/git/oilshell/oil/core/main_loop.py", line 356, in Batch
    return status
  File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 1859, in ExecuteAndCatch
    status = self._Execute(node)
  File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 1681, in _Execute
    status = self._Dispatch(node, cmd_st)
  File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 1520, in _Dispatch
    status = self._ExecuteList(if_arm.action)
  File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 1764, in _ExecuteList
    status = self._Execute(child)
  File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 1681, in _Execute
    status = self._Dispatch(node, cmd_st)
  File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 827, in _Dispatch
    status = self._Execute(node.child)
  File "/home/andy/git/oilshell/oil/osh/word_eval.py", line 2152, in EvalWordSequence2
    return self.SimpleEvalWordSequence2(words, allow_assign)
  File "/home/andy/git/oilshell/oil/osh/word_eval.py", line 2112, in SimpleEvalWordSequence2
    self._EvalWordToParts(w, part_vals, 0)  # not quoted
  File "/home/andy/git/oilshell/oil/osh/word_eval.py", line 1733, in _EvalWordToParts
    part_vals.extend(word_part_vals)
  File "/home/andy/git/oilshell/oil/osh/word_eval.py", line 1661, in _EvalWordPart
    part_val = self.expr_ev.EvalExprSub(part)
  File "/home/andy/git/oilshell/oil/ysh/expr_eval.py", line 212, in EvalExprSub
    val = self.EvalExpr(part.child, loc.Missing)
  File "/home/andy/git/oilshell/oil/ysh/expr_eval.py", line 238, in EvalExpr
    val = self._EvalExpr(node)
  File "/home/andy/git/oilshell/oil/ysh/expr_eval.py", line 1226, in _EvalExpr
    return self._EvalFuncCall(node)
  File "/home/andy/git/oilshell/oil/ysh/expr_eval.py", line 975, in _EvalFuncCall
    return ret
  File "/home/andy/git/oilshell/oil/library/func_eggex.py", line 53, in __call__
    raise NotImplementedError('_start')
NotImplementedError: _start
FATAL: couldn't import from app bundle '/home/andy/git/oilshell/oil/_tmp/oil-tar-test/oil-0.17.0/_bin/osh' (1)
Stripping the oil.ovm binary may cause this error.
See https://github.com/oilshell/oil/issues/47
osh13 Named captures with _match

[osh stdout] Expected "['2020', '08']\n", got ''
[osh status] Expected 0, got 3

stdout:
stderr: 
    argv.py $[_match('year')] $[_match('month')]
    ^~~~~~~
[ stdin ]:6: fatal: Type error in expression: Expected an integer, got 'year'
osh_ALT13 Named captures with _match

[osh_ALT stdout] Expected "['2020', '08']\n", got ''
[osh_ALT status] Expected 0, got 3

stdout:
stderr: 
    argv.py $[_match('year')] $[_match('month')]
    ^~~~~~~
[ stdin ]:6: fatal: Type error in expression: Expected an integer, got 'year'
osh15 Operator ~ assigns named variable

[osh stdout] Expected '([[:digit:]]+)\nyes\nTODO MONTH\n', got '([[:digit:]]+)\nyes\n'
[osh status] Expected 0, got 1

stdout:
([[:digit:]]+)
yes
stderr:
    = month
      ^~~~~
[ stdin ]:7: fatal: Undefined variable 'month'
osh_ALT15 Operator ~ assigns named variable

[osh_ALT stdout] Expected '([[:digit:]]+)\nyes\nTODO MONTH\n', got '([[:digit:]]+)\nyes\n'
[osh_ALT status] Expected 0, got 1

stdout:
([[:digit:]]+)
yes
stderr:
    = month
      ^~~~~
[ stdin ]:7: fatal: Undefined variable 'month'
osh22 Match non-ASCII byte denoted using $'\xff' (TODO: LANG=C)

[osh stdout] Expected ' 5b ff 5d 0a\nyes\nno\n', got ''
[osh status] Expected 0, got 1

stdout:
stderr: 
  var pat = /[ $'\xff' ]/;
               ^~
[ stdin ]:2: fatal: Use unquoted char literal for byte 255, which is >= 128 (avoid confusing a set of bytes with a sequence)
osh_ALT22 Match non-ASCII byte denoted using $'\xff' (TODO: LANG=C)

[osh_ALT stdout] Expected ' 5b ff 5d 0a\nyes\nno\n', got ''
[osh_ALT status] Expected 0, got 1

stdout:
stderr: 
  var pat = /[ $'\xff' ]/;
               ^~
[ stdin ]:2: fatal: Use unquoted char literal for byte 255, which is >= 128 (avoid confusing a set of bytes with a sequence)