summary refs log tree commit diff stats
path: root/nimpretty/tests/expected
diff options
context:
space:
mode:
Diffstat (limited to 'nimpretty/tests/expected')
-rw-r--r--nimpretty/tests/expected/exhaustive.nim12
-rw-r--r--nimpretty/tests/expected/simple.nim11
2 files changed, 17 insertions, 6 deletions
diff --git a/nimpretty/tests/expected/exhaustive.nim b/nimpretty/tests/expected/exhaustive.nim
index 82927a11c..7f78b7e56 100644
--- a/nimpretty/tests/expected/exhaustive.nim
+++ b/nimpretty/tests/expected/exhaustive.nim
@@ -272,7 +272,7 @@ proc emitTok*(em: var Emitter; L: TLexer; tok: TToken) =
     if not em.endsInWhite: wr(" ")
     wr(tok.ident.s)
     template isUnary(tok): bool =
-      tok.strongSpaceB == 0 and tok.strongSpaceA > 0
+      tok.spacing == {tsLeading}
 
     if not isUnary(tok) or em.lastTok in {tkOpr, tkDotDot}:
       wr(" ")
@@ -699,11 +699,11 @@ proc newRecordGen(ctx: Context; typ: TypRef): PNode =
 String `interpolation`:idx: / `format`:idx: inspired by
 Python's ``f``-strings.
 
-.. code-block:: nim
-
-    import strformat
-    let msg = "hello"
-    doAssert fmt"{msg}\n" == "hello\\n"
+  ```nim
+  import strformat
+  let msg = "hello"
+  doAssert fmt"{msg}\n" == "hello\\n"
+  ```
 
 Because the literal is a raw string literal, the ``\n`` is not interpreted as
 an escape sequence.
diff --git a/nimpretty/tests/expected/simple.nim b/nimpretty/tests/expected/simple.nim
index d13558621..e711eb3b6 100644
--- a/nimpretty/tests/expected/simple.nim
+++ b/nimpretty/tests/expected/simple.nim
@@ -16,3 +16,14 @@ proc a() =
 discard ## comment 3
 
 discard # comment 4
+
+
+# bug #20553
+
+let `'hello` = 12
+echo `'hello`
+
+
+proc `'u4`(n: string) =
+  # The leading ' is required.
+  discard