-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: add string function test cases
- Loading branch information
Showing
11 changed files
with
221 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
function: concat | ||
cases: | ||
- group: | ||
id: basic | ||
description: Basic examples without any special cases | ||
args: | ||
- value: 'abcd' | ||
type: string | ||
- value: 'efg' | ||
type: string | ||
result: | ||
value: 'abcdefg' | ||
type: string | ||
- group: | ||
id: null_input | ||
description: Examples with null as input | ||
args: | ||
- value: 'abcd' | ||
type: string | ||
- value: null | ||
type: string | ||
result: | ||
value: null | ||
type: string | ||
- group: null_input | ||
args: | ||
- value: null | ||
type: string | ||
- value: 'abcd' | ||
type: string | ||
result: | ||
value: null | ||
type: string | ||
- group: null_input | ||
args: | ||
- value: null | ||
type: string | ||
- value: null | ||
type: string | ||
result: | ||
value: null | ||
type: string |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
function: like | ||
cases: | ||
- group: | ||
id: basic | ||
description: Basic examples without any special cases | ||
args: | ||
- value: 'abcdefg' | ||
type: string | ||
- value: 'abcdefg' | ||
type: string | ||
result: | ||
value: true | ||
type: boolean | ||
- group: basic | ||
args: | ||
- value: 'abcdefg' | ||
type: string | ||
- value: 'abc' | ||
type: string | ||
result: | ||
value: false | ||
type: boolean | ||
- group: | ||
id: wildcard | ||
description: Examples using wildcards | ||
args: | ||
- value: 'abcdefg' | ||
type: string | ||
- value: 'abc%' | ||
type: string | ||
result: | ||
value: true | ||
type: boolean | ||
- group: wildcard | ||
args: | ||
- value: 'abcdefg' | ||
type: string | ||
- value: '%efg' | ||
type: string | ||
result: | ||
value: true | ||
type: boolean | ||
- group: wildcard | ||
args: | ||
- value: 'abcdefg' | ||
type: string | ||
- value: '_bcdefg' | ||
type: string | ||
result: | ||
value: true | ||
type: boolean | ||
- group: wildcard | ||
args: | ||
- value: 'abcdefg' | ||
type: string | ||
- value: 'abc_efg' | ||
type: string | ||
result: | ||
value: true | ||
type: boolean |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
function: substring | ||
cases: | ||
- group: | ||
id: basic | ||
description: Basic examples without any special cases | ||
args: | ||
- value: 'abcdefg' | ||
type: string | ||
- value: 1 | ||
type: i32 | ||
- value: 5 | ||
type: i32 | ||
result: | ||
value: 'abcde' | ||
type: string | ||
- group: | ||
id: zero_start | ||
description: Example where start argument is zero | ||
args: | ||
- value: 'abcdefg' | ||
type: string | ||
- value: 0 | ||
type: i32 | ||
- value: 3 | ||
type: i32 | ||
result: | ||
value: 'ab' | ||
type: string | ||
- group: | ||
id: negative_start | ||
description: Example where start argument is a negative integer | ||
args: | ||
- value: 'abcdefg' | ||
type: string | ||
- value: -3 | ||
type: i32 | ||
- value: 2 | ||
type: i32 | ||
result: | ||
value: 'ef' | ||
type: string | ||
- group: | ||
id: start_greater_than_length | ||
description: Example where start argument greater than the length of the string | ||
args: | ||
- value: 'abcdefg' | ||
type: string | ||
- value: 10 | ||
type: i32 | ||
- value: 2 | ||
type: i32 | ||
result: | ||
value: '' | ||
type: string |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters