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 "$@" } ysh-methods: spec test case results

Results for ysh-methods.test.sh

statusyshysh-cpp
pass 3030
FAIL 22
total3232
caseyshysh-cppdescription
0pass pass => operator for pure computation is allowed (may be mandatory later)
1pass pass => can be used to chain free functions
2pass pass Str => startsWith(Str) and endsWith(Str), simple
3pass pass Str => startsWith(Str) and endsWith(Str), matches bytes not runes
4pass pass Str => startsWith(Str) and endsWith(Str), eggex
5pass pass Str => startsWith(Str) and endsWith(Str), eggex with anchors
6FAIL FAIL Str => startsWith(Str) and endsWith(Str), eggex matches bytes not runes
detailsdetails
7pass pass Str => startsWith(), no args
8pass pass Str => startsWith(), too many args
9pass pass Str => endsWith(), no args
10pass pass Str => endsWith(), too many args
11pass pass Str => trim*() with no args trims whitespace
12pass pass Str => trim*() with a simple string pattern trims pattern
13pass pass Str => trim*() with a string pattern trims bytes not runes
14pass pass Str => trim*() with an eggex pattern trims pattern
15FAIL FAIL Str => trim*() with an eggex pattern trims bytes not runes
detailsdetails
16pass pass Str => trim(), too many args
17pass pass Str => trimStart(), too many args
18pass pass Str => trimEnd(), too many args
19pass pass Str => trim(), unicode whitespace aware
20pass pass Str => trim*(), unicode decoding errors
21pass pass Str => trimStart(), unicode decoding error types
22pass pass Str => trimEnd(), unicode decoding error types
23pass pass Str => trim*(), zero-codepoints are not NUL-terminators
24pass pass Dict => keys()
25pass pass Dict => values()
26pass pass Separation of -> attr and () calling
27pass pass Bound methods, receiver value/reference semantics
28pass pass List => indexOf()
29pass pass List => join()
30pass pass List->reverse()
31pass pass List->reverse() from iterator
60 passed, 0 OK, 0 not implemented, 0 BUG, 2 failed, 0 timeouts, 0 cases skipped
2 failed under osh

Details on runs that didn't PASS

ysh6 Str => startsWith(Str) and endsWith(Str), eggex matches bytes not runes

[ysh stdout] Expected 'true true\ntrue true\ntrue true\ntrue true\n' Got 'true true\ntrue true\nfalse false\nfalse false\n'

stdout:
true true
true true
false false
false false
stderr:
ysh-cpp6 Str => startsWith(Str) and endsWith(Str), eggex matches bytes not runes

[ysh-cpp stdout] Expected 'true true\ntrue true\ntrue true\ntrue true\n' Got 'true true\ntrue true\nfalse false\nfalse false\n'

stdout:
true true
true true
false false
false false
stderr:
ysh15 Str => trim*() with an eggex pattern trims bytes not runes

[ysh stdout] Expected 'b\'\\ya3\', b\'\\yce\', ""\nb\'\\ya3\', b\'\\yce\', ""\n"", "", ""\n"", "", ""\n' Got '"", "", ""\n"", "", ""\nb\'\\yce\', b\'\\yce\', b\'\\yce\'\nb\'\\yce\', b\'\\yce\', b\'\\yce\'\n'

stdout:
"", "", ""
"", "", ""
b'\yce', b'\yce', b'\yce'
b'\yce', b'\yce', b'\yce'
stderr:
ysh-cpp15 Str => trim*() with an eggex pattern trims bytes not runes

[ysh-cpp stdout] Expected 'b\'\\ya3\', b\'\\yce\', ""\nb\'\\ya3\', b\'\\yce\', ""\n"", "", ""\n"", "", ""\n' Got '"", "", ""\n"", "", ""\nb\'\\yce\', b\'\\yce\', b\'\\yce\'\nb\'\\yce\', b\'\\yce\', b\'\\yce\'\n'

stdout:
"", "", ""
"", "", ""
b'\yce', b'\yce', b'\yce'
b'\yce', b'\yce', b'\yce'
stderr: