]> gitweb.factorcode.org Git - factor.git/commitdiff
rot13: adding some tests.
authorJohn Benediktsson <mrjbq7@gmail.com>
Fri, 22 Feb 2013 17:50:26 +0000 (09:50 -0800)
committerJohn Benediktsson <mrjbq7@gmail.com>
Fri, 22 Feb 2013 17:50:26 +0000 (09:50 -0800)
extra/rot13/rot13-tests.factor [new file with mode: 0644]

diff --git a/extra/rot13/rot13-tests.factor b/extra/rot13/rot13-tests.factor
new file mode 100644 (file)
index 0000000..790eaec
--- /dev/null
@@ -0,0 +1,15 @@
+
+USING: tools.test ;
+
+IN: rot13
+
+{ "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz" } [
+    "NOPQRSTUVWXYZABCDEFGHIJKLMnopqrstuvwxyzabcdefghijklm" rot13
+] unit-test
+
+{
+    "Ubj pna lbh gryy na rkgebireg sebz na\nvagebireg ng AFN? In the elevators,\nthe extrovert looks at the OTHER guy's shoes."
+} [
+    "How can you tell an extrovert from an\nintrovert at NSA? Va gur ryringbef,\ngur rkgebireg ybbxf ng gur BGURE thl'f fubrf."
+    rot13
+] unit-test