nitlanguage
/
nit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
nitunit: fix some nitunit flags.
[nit.git]
/
tests
/
test_string_search.nit
diff --git
a/tests/test_string_search.nit
b/tests/test_string_search.nit
index
f78ad4b
..
0702869
100644
(file)
--- a/
tests/test_string_search.nit
+++ b/
tests/test_string_search.nit
@@
-15,7
+15,7
@@
# limitations under the License.
# limitations under the License.
-meth search_and_split(s: String, p: Pattern)
+fun search_and_split(s: String, p: Pattern)
do
print("string: \"{s}\" ; pattern: \"{p}\"")
print("searches:")
do
print("string: \"{s}\" ; pattern: \"{p}\"")
print("searches:")
@@
-23,11
+23,11
@@
meth search_and_split(s: String, p: Pattern)
print("* [{m.from}, {m.after}[ = \"{m}\"")
end
print("splits:")
print("* [{m.from}, {m.after}[ = \"{m}\"")
end
print("splits:")
- for m in p.split_in(s) do
- print("* [{m.from}, {m.after}[ = \"{m}\"")
+ for m in s.split(p) do
+ print("* \"{m}\"")
end
end
- print("join: {s.split_with(p).join(", ")}")
+ print("join: {s.split(p).join(", ")}")
end
search_and_split("A simple example", ' ')
end
search_and_split("A simple example", ' ')