ref: 7ba5cd3848e0d7acc521623a97501a6d9b68d871
parent: aa4849acf33141833a8383548ac367d6d072e129
author: Ori Bernstein <[email protected]>
date: Sun Sep 14 19:15:07 EDT 2014
Add test cases for strstrip.
--- a/test/data/strstrip-expected
+++ b/test/data/strstrip-expected
@@ -1,3 +1,7 @@
+"cccc"
+"cccc"
+"cccc"
+--
"abc"
"abc "
" abc"
--- a/test/strstrip.myr
+++ b/test/strstrip.myr
@@ -1,6 +1,11 @@
use std
const main = {
+ std.put("\"%s\"\n", std.strstrip("cccc"))
+ std.put("\"%s\"\n", std.strfstrip("cccc"))
+ std.put("\"%s\"\n", std.strrstrip("cccc"))
+
+ std.put("--\n")
std.put("\"%s\"\n", std.strstrip(" abc "))
std.put("\"%s\"\n", std.strfstrip(" abc "))
std.put("\"%s\"\n", std.strrstrip(" abc "))