summaryrefslogtreecommitdiff
path: root/t/indented-block.t
diff options
context:
space:
mode:
Diffstat (limited to 't/indented-block.t')
-rw-r--r--t/indented-block.t19
1 files changed, 19 insertions, 0 deletions
diff --git a/t/indented-block.t b/t/indented-block.t
new file mode 100644
index 0000000..9acf5e6
--- /dev/null
+++ b/t/indented-block.t
@@ -0,0 +1,19 @@
+#! /usr/bin/env perl6
+
+use v6.c;
+
+use String::Fold;
+use Test;
+
+my @result-lines = fold(slurp("t/files/input/indented-block.txt"), :indent(8)).lines;
+my @expected-lines = slurp("t/files/output/indented-block.txt").trim-trailing.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