Results for ysh-methods.test.sh

statusysh
pass 33
FAIL 4
total37
caseyshdescription
0pass => operator for pure computation is allowed (may be mandatory later)
1pass => can be used to chain free functions
2pass Str => startsWith(Str) and endsWith(Str), simple
3pass Str => startsWith(Str) and endsWith(Str), matches bytes not runes
4pass Str => startsWith(Str) and endsWith(Str), eggex
5pass Str => startsWith(Str) and endsWith(Str), eggex with anchors
6FAIL Str => startsWith(Str) and endsWith(Str), eggex matches bytes not runes
details
7pass Str => startsWith(), no args
8pass Str => startsWith(), too many args
9pass Str => endsWith(), no args
10pass Str => endsWith(), too many args
11pass Str => trim*() with no args trims whitespace
12pass Str => trim*() with a simple string pattern trims pattern
13pass Str => trim*() with a string pattern trims bytes not runes
14pass Str => trim*() with an eggex pattern trims pattern
15FAIL Str => trim*() with an eggex pattern trims bytes not runes
details
16pass Str => trim(), too many args
17pass Str => trimStart(), too many args
18pass Str => trimEnd(), too many args
19pass Str => trim(), unicode whitespace aware
20pass Str => trim*(), unicode decoding errors
21pass Str => trimStart(), unicode decoding error types
22pass Str => trimEnd(), unicode decoding error types
23pass Str => trim*(), zero-codepoints are not NUL-terminators
24pass Dict => keys()
25FAIL Str => split(sep), non-empty sep
details
26FAIL Str => split(sep, count), non-empty sep
details
27pass Str => split(), usage errors
28pass Dict => values()
29pass Dict -> erase()
30pass Dict -> get()
31pass Separation of -> attr and () calling
32pass Bound methods, receiver value/reference semantics
33pass List => indexOf()
34pass List => join()
35pass List->reverse()
36pass List->reverse() from iterator
33 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

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:
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:
ysh25 Str => split(sep), non-empty sep

[ysh stdout] Expected '(List) ["a","b","c"]\n(List) ["","",""]\n(List) ["a","b","c<d"]\n(List) ["a","b","","c"]\n(List) []\n' Got ''
[ysh status] Expected 0, got 3

stdout:
stderr: 
  pp test_ ('a,b,c'.split(','))
                    ^~~~~
[ stdin ]:1: fatal: Method 'split' does not exist on builtin type Str
ysh26 Str => split(sep, count), non-empty sep

[ysh stdout] Expected '(List) ["a","b","c"]\n(List) ["a","b","c"]\n(List) ["","a"]\n(List) ["a","b","c<d"]\n(List) ["a","b",";c"]\n(List) []\n(List) []\n' Got ''
[ysh status] Expected 0, got 3

stdout:
stderr: 
  pp test_ ('a,b,c'.split(',', count=-1))
                    ^~~~~
[ stdin ]:1: fatal: Method 'split' does not exist on builtin type Str