summary refs log tree commit diff stats
path: root/nimpretty/tests
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2018-06-20 00:59:01 +0200
committerAndreas Rumpf <rumpf_a@web.de>2018-06-20 00:59:01 +0200
commit2a662250d4b12a6dfdc488ec369439101fac209c (patch)
tree55f4d0d7af4808949002842c8f4ee9e287f464ff /nimpretty/tests
parent0725003a8cdb90e149d91fc6c5affcb270223be7 (diff)
downloadNim-2a662250d4b12a6dfdc488ec369439101fac209c.tar.gz
nimpretty: added more code claimed to not be working
Diffstat (limited to 'nimpretty/tests')
-rw-r--r--nimpretty/tests/exhaustive.nim13
-rw-r--r--nimpretty/tests/expected/exhaustive.nim13
2 files changed, 26 insertions, 0 deletions
diff --git a/nimpretty/tests/exhaustive.nim b/nimpretty/tests/exhaustive.nim
index bca42d4d4..0ce3bde89 100644
--- a/nimpretty/tests/exhaustive.nim
+++ b/nimpretty/tests/exhaustive.nim
@@ -285,3 +285,16 @@ proc starWasExportMarker*(em: var Emitter) =
     setLen(em.content, em.content.len-3)
     em.content.add("*")
     dec em.col, 2
+
+type
+  Thing = ref object
+    grade: string
+    # this name is great
+    name: string
+
+proc f() =
+  var c: char
+  var str: string
+  if c == '\\':
+    # escape char
+    str &= c
diff --git a/nimpretty/tests/expected/exhaustive.nim b/nimpretty/tests/expected/exhaustive.nim
index 4520fb9bd..dd3ff74e8 100644
--- a/nimpretty/tests/expected/exhaustive.nim
+++ b/nimpretty/tests/expected/exhaustive.nim
@@ -292,3 +292,16 @@ proc starWasExportMarker*(em: var Emitter) =
     setLen(em.content, em.content.len-3)
     em.content.add("*")
     dec em.col, 2
+
+type
+  Thing = ref object
+    grade: string
+    # this name is great
+    name: string
+
+proc f() =
+  var c: char
+  var str: string
+  if c == '\\':
+    # escape char
+    str &= c