aboutsummaryrefslogtreecommitdiff
path: root/lib/strings/testdata
diff options
context:
space:
mode:
authorShulhan <ms@kilabit.info>2022-08-03 22:27:33 +0700
committerShulhan <ms@kilabit.info>2022-08-03 22:27:33 +0700
commitec98ea095fa85b5a4b64bd7ad37414c30d14310e (patch)
treea0d0af0ad27852b1644972ee2b11e870ea5acc03 /lib/strings/testdata
parent39d9c20c35a11c44cdd27783e407c1225027d820 (diff)
downloadpakakeh.go-ec98ea095fa85b5a4b64bd7ad37414c30d14310e.tar.xz
lib/strings: clean up test codes
Changes, * Use test.Data for test that require longer text input and output * Replace variable declaration ":=" with explicit one. * Use literal string
Diffstat (limited to 'lib/strings/testdata')
-rw-r--r--lib/strings/testdata/clean_uri_test.txt31
-rw-r--r--lib/strings/testdata/clean_wiki_markup_test.txt37
-rw-r--r--lib/strings/testdata/split_test.txt23
3 files changed, 91 insertions, 0 deletions
diff --git a/lib/strings/testdata/clean_uri_test.txt b/lib/strings/testdata/clean_uri_test.txt
new file mode 100644
index 00000000..fd85d251
--- /dev/null
+++ b/lib/strings/testdata/clean_uri_test.txt
@@ -0,0 +1,31 @@
+This test remove any URL from the strings.
+
+>>>
+ftp://test.com/123 The [[United States]] has regularly voted alone and
+against international consensus, using its [[United Nations Security Council
+veto power|veto power]] to block the adoption of proposed UN Security Council
+resolutions supporting the [[PLO]] and calling for a two-state solution to the
+[[Israeli-Palestinian
+conflict]].<ref>[http://books.google.ca/books?id=CHL5SwGvobQC&pg=PA168&dq=US+veto+Israel+regularly#v=onepage&q=US%20veto%20Israel%20regularly&f=false
+Pirates and emperors, old and new: international terrorism in the real world],
+[[Noam Chomsky]], p. 168.</ref><ref>The US has also used its veto to block
+resolutions that are critical of
+Israel.[https://books.google.ca/books?id=yzmpDAz7ZAwC&pg=PT251&dq=US+veto+Israel+regularly&lr=#v=onepage&q=US%20veto%20Israel%20regularly&f=false
+Uneasy neighbors], David T. Jones and David Kilgour, p. 235.</ref> The United
+States responded to the frequent criticism from UN organs by adopting the
+[[Negroponte doctrine]].
+
+<<<
+ The [[United States]] has regularly voted alone and
+against international consensus, using its [[United Nations Security Council
+veto power|veto power]] to block the adoption of proposed UN Security Council
+resolutions supporting the [[PLO]] and calling for a two-state solution to the
+[[Israeli-Palestinian
+conflict]].<ref>[
+Pirates and emperors, old and new: international terrorism in the real world],
+[[Noam Chomsky]], p. 168.</ref><ref>The US has also used its veto to block
+resolutions that are critical of
+Israel.[
+Uneasy neighbors], David T. Jones and David Kilgour, p. 235.</ref> The United
+States responded to the frequent criticism from UN organs by adopting the
+[[Negroponte doctrine]].
diff --git a/lib/strings/testdata/clean_wiki_markup_test.txt b/lib/strings/testdata/clean_wiki_markup_test.txt
new file mode 100644
index 00000000..852d52e4
--- /dev/null
+++ b/lib/strings/testdata/clean_wiki_markup_test.txt
@@ -0,0 +1,37 @@
+>>>
+==External links==
+*[http://www.bigfinish.com/24-Doctor-Who-The-Eye-of-the-Scorpion Big Finish Productions - ''The Eye of the Scorpion'']
+*{{Doctor Who RG | id=who_bf24 | title=The Eye of the Scorpion}}
+===Reviews===
+* Test image [[Image:fileto.png]].
+* Test file [[File:fileto.png]].
+*{{OG review | id=bf-24 | title=The Eye of the Scorpion}}
+*{{DWRG | id=eyes | title=The Eye of the Scorpion}}
+
+<br clear="all">
+{{Fifthdoctoraudios}}
+
+{{DEFAULTSORT:Eye of the Scorpion, The}}
+[[Category:Fifth Doctor audio plays]]
+[[Category:Fifth Doctor audio plays]]
+[[:Category:2001 audio plays]]
+{{DoctorWho-stub}}
+
+<<<
+==External links==
+*[http://www.bigfinish.com/24-Doctor-Who-The-Eye-of-the-Scorpion Big Finish Productions - ''The Eye of the Scorpion'']
+*{{Doctor Who RG | id=who_bf24 | title=The Eye of the Scorpion}}
+===Reviews===
+* Test image .
+* Test file .
+*{{OG review | id=bf-24 | title=The Eye of the Scorpion}}
+*{{DWRG | id=eyes | title=The Eye of the Scorpion}}
+
+<br clear="all">
+{{Fifthdoctoraudios}}
+
+
+
+
+
+{{DoctorWho-stub}}
diff --git a/lib/strings/testdata/split_test.txt b/lib/strings/testdata/split_test.txt
new file mode 100644
index 00000000..630738be
--- /dev/null
+++ b/lib/strings/testdata/split_test.txt
@@ -0,0 +1,23 @@
+Test Split with clean and unique parameters.
+
+>>> Single-line
+// Copyright 2016-2018 Shulhan <ms@kilabit.info>. All rights reserved.
+
+<<< Single-line
+Copyright 2016-2018 Shulhan ms@kilabit.info All rights reserved
+
+>>> Multi-line
+The [[United States]] has regularly voted alone and
+against international consensus, using its [[United Nations
+Security Council veto power|veto power]] to block the adoption
+of proposed UN Security Council resolutions supporting the
+[[PLO]] and calling for a two-state solution to the
+[[Israeli-Palestinian conflict]].
+
+<<< Multi-line
+The United States has regularly voted alone and
+against international consensus using its Nations
+Security Council veto power|veto power to block adoption
+of proposed UN resolutions supporting
+PLO calling for a two-state solution
+Israeli-Palestinian conflict