]> gitweb.factorcode.org Git - factor.git/commitdiff
pdf.wrap: adding some tests.
authorJohn Benediktsson <mrjbq7@gmail.com>
Thu, 28 Mar 2013 02:05:20 +0000 (19:05 -0700)
committerJohn Benediktsson <mrjbq7@gmail.com>
Thu, 28 Mar 2013 02:05:20 +0000 (19:05 -0700)
extra/pdf/wrap/wrap-tests.factor [new file with mode: 0644]

diff --git a/extra/pdf/wrap/wrap-tests.factor b/extra/pdf/wrap/wrap-tests.factor
new file mode 100644 (file)
index 0000000..3343e04
--- /dev/null
@@ -0,0 +1,14 @@
+USING: fonts tools.test ;
+IN: pdf.wrap
+
+{ "hello,      " "extra spaces" } [
+    "hello,      extra spaces" word-split1
+] unit-test
+
+{ { "hello, " "world " "how " "are " "you?" } } [
+    "hello, world how are you?" word-split
+] unit-test
+
+{ { "hello, world " "how are you?" } } [
+    "hello, world how are you?" monospace-font 100 visual-wrap
+] unit-test