-
-
Notifications
You must be signed in to change notification settings - Fork 695
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into docs_site_preview_in_ci
- Loading branch information
Showing
158 changed files
with
2,737 additions
and
510 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# These are supported funding model platforms | ||
github: tmc |
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,53 @@ | ||
package callbacks | ||
|
||
import ( | ||
"testing" | ||
|
||
"github.com/stretchr/testify/require" | ||
) | ||
|
||
func TestFilterFinalString(t *testing.T) { | ||
t.Parallel() | ||
|
||
cases := []struct { | ||
keyword string | ||
inputStr string | ||
expected string | ||
}{ | ||
{ | ||
keyword: "Final Answer:", | ||
inputStr: "This is a correct final string.", | ||
expected: "This is a correct final string.", | ||
}, | ||
{ | ||
keyword: "Final Answer:", | ||
inputStr: " some other text above.\nFinal Answer: This is a correct final string.", | ||
expected: "This is a correct final string.", | ||
}, | ||
{ | ||
keyword: "Final Answer:", | ||
inputStr: " another text before. Final Answer: This is a correct final string.", | ||
expected: "This is a correct final string.", | ||
}, | ||
{ | ||
keyword: "Final Answer:", | ||
inputStr: ` : This is a correct final string.`, | ||
expected: "This is a correct final string.", | ||
}, | ||
{ | ||
keyword: "Customed KeyWord_2:", | ||
inputStr: " some other text above.\nSome Customed KeyWord_2: This is a correct final string.", | ||
expected: "This is a correct final string.", | ||
}, | ||
{ | ||
keyword: "Customed KeyWord_$#@-123:", | ||
inputStr: " another text before keyword. Some Customed KeyWord_$#@-123: This is a correct final string.", | ||
expected: "This is a correct final string.", | ||
}, | ||
} | ||
|
||
for _, tc := range cases { | ||
filteredStr := filterFinalString(tc.inputStr, tc.keyword) | ||
require.Equal(t, tc.expected, filteredStr) | ||
} | ||
} |
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
Oops, something went wrong.