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-expr-compare: spec test case results

Results for ysh-expr-compare.test.sh

statusoshosh-cpp
pass 1414
FAIL 11
total1515
caseoshosh-cppdescription
0pass pass Exact equality with === and !==
1pass pass Approximate equality of Str x {Str, Int, Bool} with ~==
2pass pass Wrong Types with ~==
3FAIL FAIL ~== on Float - TODO floatEquals()
detailsdetails
4pass pass Comparison converts from Str -> Int or Float
5pass pass Comparison of Int
6pass pass Comparison of Str does conversion to Int
7pass pass Mixed Type Comparison does conversion to Int
8pass pass Invalid String is an error
9pass pass Bool conversion -- explicit allowed, implicit not allowed
10pass pass Chained Comparisons
11pass pass List / "Tuple" comparison is not allowed
12pass pass Ternary op behaves like if statement
13pass pass Undefined comparisons
14pass pass Non-comparable types in case arms
28 passed, 0 OK, 0 not implemented, 0 BUG, 1 failed, 0 timeouts, 0 cases skipped
1 failed under osh

Details on runs that didn't PASS

osh3 ~== on Float - TODO floatEquals()

[osh status] Expected 0, got 1

stdout:
stderr: 
  if (42 ~== 42.0) {
         ^~~
[ stdin ]:3: fatal: ~== expects a string on the left
osh-cpp3 ~== on Float - TODO floatEquals()

[osh-cpp status] Expected 0, got 1

stdout:
stderr: 
  if (42 ~== 42.0) {
         ^~~
[ stdin ]:3: fatal: ~== expects a string on the left