]> gitweb.factorcode.org Git - factor.git/blobdiff - extra/rot13/rot13-tests.factor
rot13: adding some tests.
[factor.git] / extra / rot13 / rot13-tests.factor
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