summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2013-12-12 02:07:28 -0500
committerOri Bernstein <ori@eigenstate.org>2013-12-12 02:07:28 -0500
commitea7fb6cca6d0fbe0f4f3f3ef269d97e76c488c27 (patch)
tree722ac89fffb52e3df497614784b96dae6b96d6dd /test
parentb7b99ac74c22eaf17e89c79327c0c32f991ce089 (diff)
downloadmc-ea7fb6cca6d0fbe0f4f3f3ef269d97e76c488c27.tar.gz
Add one more missing file
Diffstat (limited to 'test')
-rw-r--r--test/strstrip.myr23
1 files changed, 23 insertions, 0 deletions
diff --git a/test/strstrip.myr b/test/strstrip.myr
new file mode 100644
index 0000000..c813013
--- /dev/null
+++ b/test/strstrip.myr
@@ -0,0 +1,23 @@
+use std
+
+const main = {
+ std.put("\"%s\"\n", std.strstrip(" abc "))
+ std.put("\"%s\"\n", std.strfstrip(" abc "))
+ std.put("\"%s\"\n", std.strrstrip(" abc "))
+
+ std.put("--\n")
+ std.put("\"%s\"\n", std.strstrip(" 世界 "))
+ std.put("\"%s\"\n", std.strfstrip(" 世界 "))
+ std.put("\"%s\"\n", std.strrstrip(" 世界 "))
+
+ std.put("--\n")
+ std.put("\"%s\"\n", std.strstrip(" "))
+ std.put("\"%s\"\n", std.strfstrip(" "))
+ std.put("\"%s\"\n", std.strrstrip(" "))
+
+ std.put("--\n")
+ std.put("\"%s\"\n", std.strstrip(""))
+ std.put("\"%s\"\n", std.strfstrip(""))
+ std.put("\"%s\"\n", std.strrstrip(""))
+ -> 0
+}