Skip to content

Commit

Permalink
improve the order of test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
itchyny committed Nov 17, 2022
1 parent fe0e20a commit 35c123b
Showing 1 changed file with 69 additions and 69 deletions.
138 changes: 69 additions & 69 deletions cli/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1920,6 +1920,26 @@
"endswith cannot be applied to: object ({})"
"endswith cannot be applied to: number (10)"
- name: combinations/0 function
args:
- -c
- '[combinations]'
input: '[] [[0]] [[1, 2, 3], [4, 5, 6]]'
expected: |
[[]]
[[0]]
[[1,4],[1,5],[1,6],[2,4],[2,5],[2,6],[3,4],[3,5],[3,6]]
- name: combinations/1 function
args:
- -c
- '[combinations(3)]'
input: '[] [0] [1, 2]'
expected: |
[]
[[0,0,0]]
[[1,1,1],[1,1,2],[1,2,1],[1,2,2],[2,1,1],[2,1,2],[2,2,1],[2,2,2]]
- name: ltrimstr function
args:
- 'map(ltrimstr("foo")), ("x"|ltrimstr(0, null, {}))'
Expand Down Expand Up @@ -1962,25 +1982,62 @@
"x"
"x"
- name: combinations/0 function
- name: explode function
args:
- -c
- '[combinations]'
input: '[] [[0]] [[1, 2, 3], [4, 5, 6]]'
- 'explode'
input: |
""
"foo bar"
"12345"
"\n\t"
expected: |
[]
[102,111,111,32,98,97,114]
[65297,65298,65299,65300,65301]
[10,9]
- name: implode function
args:
- 'implode'
input: |
[]
[102,111,111,32,98,97,114]
[65297,65298,65299,65300,65301]
[10,9]
expected: |
""
"foo bar"
"12345"
"\n\t"
- name: implode function error
args:
- 'try implode catch .'
input: |
[0]
[-1]
[1114112]
[[]]
[[0]]
[[1,4],[1,5],[1,6],[2,4],[2,5],[2,6],[3,4],[3,5],[3,6]]
[{}]
expected: |
"\u0000"
"implode cannot be applied to: array ([-1])"
"implode cannot be applied to: array ([1114112])"
"implode cannot be applied to: array ([[]])"
"implode cannot be applied to: array ([{}])"
- name: combinations/1 function
- name: split/1 function
args:
- -c
- '[combinations(3)]'
input: '[] [0] [1, 2]'
- 'split(", ","") | join("/")'
input: |
"a,b, c, d, e,f"
", a,b, c, d, e,f, "
expected: |
[]
[[0,0,0]]
[[1,1,1],[1,1,2],[1,2,1],[1,2,2],[2,1,1],[2,1,2],[2,2,1],[2,2,2]]
"a,b/c/d/e,f"
"a/,/b/,/ /c/,/ /d/,/ /e/,/f"
"/a,b/c/d/e,f/"
",/ /a/,/b/,/ /c/,/ /d/,/ /e/,/f/,/ "
- name: join function
args:
Expand Down Expand Up @@ -2818,63 +2875,6 @@
expected: |
[5,5,false,3,3,[null,false],null,false]
- name: explode function
args:
- -c
- 'explode'
input: |
""
"foo bar"
"12345"
"\n\t"
expected: |
[]
[102,111,111,32,98,97,114]
[65297,65298,65299,65300,65301]
[10,9]
- name: implode function
args:
- 'implode'
input: |
[]
[102,111,111,32,98,97,114]
[65297,65298,65299,65300,65301]
[10,9]
expected: |
""
"foo bar"
"12345"
"\n\t"
- name: implode function error
args:
- 'try implode catch .'
input: |
[0]
[-1]
[1114112]
[[]]
[{}]
expected: |
"\u0000"
"implode cannot be applied to: array ([-1])"
"implode cannot be applied to: array ([1114112])"
"implode cannot be applied to: array ([[]])"
"implode cannot be applied to: array ([{}])"
- name: split/1 function
args:
- 'split(", ","") | join("/")'
input: |
"a,b, c, d, e,f"
", a,b, c, d, e,f, "
expected: |
"a,b/c/d/e,f"
"a/,/b/,/ /c/,/ /d/,/ /e/,/f"
"/a,b/c/d/e,f/"
",/ /a/,/b/,/ /c/,/ /d/,/ /e/,/f/,/ "
- name: condition
args:
- 'if . then . else [.] end'
Expand Down

0 comments on commit 35c123b

Please sign in to comment.