summary refs log tree commit diff stats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/stdlib/tstrutil.nim22
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/stdlib/tstrutil.nim b/tests/stdlib/tstrutil.nim
index ef5b041be..162b8ea1b 100644
--- a/tests/stdlib/tstrutil.nim
+++ b/tests/stdlib/tstrutil.nim
@@ -435,3 +435,25 @@ block:
   doAssert a == f1
   doAssert b == f2
   doAssert c == f3
+
+block:
+  assert 0 == indentation """
+hey
+  low
+    there
+"""
+  assert 2 == indentation """
+  hey
+    low
+      there
+"""
+  assert 2 == indentation """  hey
+    low
+      there
+"""
+  assert 2 == indentation """  hey
+    low
+      there"""
+  assert 0 == indentation ""
+  assert 0 == indentation "  \n  \n"
+  assert 0 == indentation "    "