summaryrefslogtreecommitdiff
path: root/t/paragraphs.t
diff options
context:
space:
mode:
Diffstat (limited to 't/paragraphs.t')
-rw-r--r--t/paragraphs.t23
1 files changed, 23 insertions, 0 deletions
diff --git a/t/paragraphs.t b/t/paragraphs.t
new file mode 100644
index 0000000..99b557f
--- /dev/null
+++ b/t/paragraphs.t
@@ -0,0 +1,23 @@
+#! /usr/bin/env perl6
+
+use v6.c;
+
+use String::Fold;
+use Test;
+
+plan 1;
+
+subtest "Three paragraphs" => {
+ my @result-lines = fold(slurp("t/files/input/three-paragraphs.txt")).lines;
+ my @expected-lines = slurp("t/files/output/three-paragraphs.txt").trim.lines;
+
+ plan 1 + @expected-lines.elems;
+
+ is @result-lines.elems, @expected-lines.elems, "Expected number of lines";
+
+ for ^@expected-lines {
+ is @result-lines[$_], @expected-lines[$_], "Line {$_ + 1} is the same";
+ }
+}
+
+# vim: ft=perl6 noet