run-file () { local spec_name=$1; shift; local spec_file=spec/$spec_name.test.sh; local suite; suite=$(test/sh_spec.py --print-spec-suite $spec_file); local spec_subdir; case $suite in osh) spec_subdir='osh-cpp' ;; ysh) spec_subdir='ysh-cpp' ;; *) die "Invalid suite $suite" ;; esac; local base_dir=_tmp/spec/$spec_subdir; mkdir -v -p $base_dir; sh-spec $spec_file --timeout 10 --oils-bin-dir $PWD/bin --oils-cpp-bin-dir $REPO_ROOT/_bin/cxx-asan --tsv-output $base_dir/${spec_name}.tsv "$@" } regex: spec test case results

Results for regex.test.sh

statusoshosh-cpp
pass 3737
total3737
caseoshosh-cppdescription
0pass pass BASH_REMATCH
1pass pass Match is unanchored at both ends
2pass pass Failed match
3pass pass Regex quoted with \ -- preferred in bash
4pass pass Regex quoted with single quotes
5pass pass Regex quoted with double quotes
6pass pass Fix single quotes by storing in variable
7pass pass Fix single quotes by storing in variable
8pass pass Double quoting pat variable -- again bash doesn't like it.
9pass pass Mixing quoted and unquoted parts
10pass pass Regex with == and not =~ is parse error, different lexer mode required
11pass pass Omitting ( )
12pass pass Malformed regex
13pass pass Regex with |
14pass pass Regex to match literal brackets []
15pass pass Regex to match literals . ^ $ etc.
16pass pass Unquoted { is a regex parse error
17pass pass Fatal error inside [[ =~ ]]
18pass pass Quoted { and +
19pass pass Escaped {
20pass pass Escaped { stored in variable first
21pass pass regex with ?
22pass pass regex with unprintable characters
23pass pass pattern $f(x) -- regression
24pass pass pattern a=(1)
25pass pass pattern @f(x)
26pass pass Bug: Nix idiom with closing ) next to pattern
27pass pass unquoted (a b) as pattern, (a b|c)
28pass pass Multiple adjacent () groups
29pass pass unquoted [a b] as pattern, [a b|c]
30pass pass c|a unquoted
31pass pass Operator chars ; & but not |
32pass pass Quotes '' "" $'' $"" in pattern
33pass pass Unicode in pattern
34pass pass Parse error with 2 words
35pass pass make a lisp example
36pass pass Operators and space lose meaning inside ()
74 passed, 0 OK, 0 not implemented, 0 BUG, 0 failed, 0 timeouts, 0 cases skipped