projects
/
YACASL2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
トークンの処理を推敲
[YACASL2.git]
/
test
/
unit
/
strip_end
/
cmd.c
diff --git a/test/unit/strip_end/cmd.c
b/test/unit/strip_end/cmd.c
new file mode 100644
(file)
index 0000000..
d7122e4
--- /dev/null
+++ b/
test/unit/strip_end/cmd.c
@@ -0,0
+1,11
@@
+#include <stdio.h>
+#include "cmem.h"
+
+int main(){
+ char s[][10] = {"abc\n", "abc ", "abc\t", "abc\t\n", "abc"};
+
+ for(int i = 0; i < sizeof(s) / sizeof(s[0]); i++) {
+ printf("%s:\n", strip_end(s[i]));
+ }
+ return 0;
+}