aboutsummaryrefslogtreecommitdiff
path: root/tests/test-suite/pm-gsub.lua
diff options
context:
space:
mode:
authordaurnimator <quae@daurnimator.com>2018-04-02 22:44:25 +1000
committerdaurnimator <quae@daurnimator.com>2018-04-14 16:52:26 +1000
commitce9fd9bdca0caa6a33ce37a01f41593ca42ba95b (patch)
tree946b66efd1f265c9ccb143b61d6c480929267673 /tests/test-suite/pm-gsub.lua
parentd67a6ab6688d315f521b3a2ebc0e018969213b21 (diff)
downloadfengari-ce9fd9bdca0caa6a33ce37a01f41593ca42ba95b.tar.gz
fengari-ce9fd9bdca0caa6a33ce37a01f41593ca42ba95b.tar.bz2
fengari-ce9fd9bdca0caa6a33ce37a01f41593ca42ba95b.zip
Start moving test suite from tape => jest
Diffstat (limited to 'tests/test-suite/pm-gsub.lua')
-rw-r--r--tests/test-suite/pm-gsub.lua17
1 files changed, 0 insertions, 17 deletions
diff --git a/tests/test-suite/pm-gsub.lua b/tests/test-suite/pm-gsub.lua
deleted file mode 100644
index d873cce..0000000
--- a/tests/test-suite/pm-gsub.lua
+++ /dev/null
@@ -1,17 +0,0 @@
-assert(string.gsub('ülo ülo', 'ü', 'x') == 'xlo xlo')
-assert(string.gsub('alo úlo ', ' +$', '') == 'alo úlo') -- trim
-assert(string.gsub(' alo alo ', '^%s*(.-)%s*$', '%1') == 'alo alo') -- double trim
-assert(string.gsub('alo alo \n 123\n ', '%s+', ' ') == 'alo alo 123 ')
-t = "abç d"
-a, b = string.gsub(t, '(.)', '%1@')
-assert('@'..a == string.gsub(t, '', '@') and b == 5)
-a, b = string.gsub('abçd', '(.)', '%0@', 2)
-assert(a == 'a@b@çd' and b == 2)
-assert(string.gsub('alo alo', '()[al]', '%1') == '12o 56o')
-assert(string.gsub("abc=xyz", "(%w*)(%p)(%w+)", "%3%2%1-%0") ==
- "xyz=abc-abc=xyz")
-assert(string.gsub("abc", "%w", "%1%0") == "aabbcc")
-assert(string.gsub("abc", "%w+", "%0%1") == "abcabc")
-assert(string.gsub('áéí', '$', '\0óú') == 'áéí\0óú')
-assert(string.gsub('', '^', 'r') == 'r')
-assert(string.gsub('', '$', 'r') == 'r')