-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Fix] The way of getting testcases (#36)
* fix the way of getting testcases * update readme * use parameterized macro * fix * fix * fix
- Loading branch information
1 parent
96f6ab9
commit 3b1006c
Showing
5 changed files
with
83 additions
and
58 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 |
---|---|---|
@@ -1,9 +1,15 @@ | ||
tests[0] = (testcase) { .name = "usual", | ||
.argv = "10", | ||
.input = "I hate programming in C so much.", | ||
.output = "Ihateprogr\namminginCs\nomuch.\n" }; | ||
tests[1] = (testcase) { .name = "multiline", | ||
.argv = "10", | ||
.input = "I hate programming in C so much.\nI'm getting headache.", | ||
.output = "Ihateprogr\namminginCs\nomuch.I'mg\nettinghead\nache.\n" }; | ||
tlen = 2; | ||
TEST | ||
( | ||
"usual", | ||
"10", | ||
"I hate programming in C so much.", | ||
"Ihateprogr\namminginCs\nomuch.\n" | ||
) | ||
|
||
TEST | ||
( | ||
"multiline", | ||
"10", | ||
"I hate programming in C so much.\nI'm getting headache.", | ||
"Ihateprogr\namminginCs\nomuch.I'mg\nettinghead\nache.\n" | ||
) |
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 |
---|---|---|
@@ -1,29 +1,31 @@ | ||
tests[0] = (testcase) | ||
{ | ||
.name = "no-heading", | ||
.argv = "", | ||
.input = "test", | ||
.output = "# test\n" | ||
}; | ||
tests[1] = (testcase) | ||
{ | ||
.name = "heading", | ||
.argv = "", | ||
.input = "# test", | ||
.output = "# test\n" | ||
}; | ||
tests[2] = (testcase) | ||
{ | ||
.name = "no_heading_multiline", | ||
.argv = "", | ||
.input = "test\ntest2\n", | ||
.output = "# test\n# test2\n\n" | ||
}; | ||
tests[3] = (testcase) | ||
{ | ||
.name = "heading_multiline", | ||
.argv = "", | ||
.input = "# test\n# test2\n", | ||
.output = "# test\n# test2\n\n" | ||
}; | ||
tlen = 4; | ||
TEST | ||
( | ||
"no-heading", | ||
"", | ||
"test", | ||
"# test\n" | ||
) | ||
|
||
TEST | ||
( | ||
"heading", | ||
"", | ||
"# test", | ||
"# test\n" | ||
) | ||
|
||
TEST | ||
( | ||
"no_heading_multiline", | ||
"", | ||
"test\ntest2\n", | ||
"# test\n# test2\n\n" | ||
) | ||
|
||
TEST | ||
( | ||
"heading_multiline", | ||
"", | ||
"# test\n# test2\n", | ||
"# test\n# test2\n\n" | ||
) |
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 |
---|---|---|
@@ -1,16 +1,23 @@ | ||
tests[0] = (testcase) { | ||
.name = "e-mark", | ||
.argv = "e", | ||
.input = "asdf", | ||
.output = "!a!s!d!f!\n"}; | ||
tests[1] = (testcase) { | ||
.name = "q-mark", | ||
.argv = "q", | ||
.input = "asdf", | ||
.output = "?a?s?d?f?\n" }; | ||
tests[2] = (testcase) { | ||
.name = "multiline", | ||
.argv = "e", | ||
.input = "asdf\nqwer", | ||
.output = "!a!s!d!f!q!w!e!r!\n" }; | ||
tlen = 3; | ||
TEST | ||
( | ||
"e-mark", | ||
"e", | ||
"asdf", | ||
"!a!s!d!f!\n" | ||
) | ||
|
||
TEST | ||
( | ||
"q-mark", | ||
"q", | ||
"asdf", | ||
"?a?s?d?f?\n" | ||
) | ||
|
||
TEST | ||
( | ||
"multiline", | ||
"e", | ||
"asdf\nqwer", | ||
"!a!s!d!f!q!w!e!r!\n" | ||
) |
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