diff options
author | Andreas Rumpf <rumpf_a@web.de> | 2018-10-16 16:54:52 +0200 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2018-10-16 16:55:04 +0200 |
commit | f3c0703b7d563a86757fd92d0707be4309787f53 (patch) | |
tree | eb8e7f981b7b810070c8743302e170cf2bf33f5c /nimpretty/tests | |
parent | ed38079b9ba56ae494995e0eb594b824b45d5ad9 (diff) | |
download | Nim-f3c0703b7d563a86757fd92d0707be4309787f53.tar.gz |
nimpretty: add #!nimpretty on/off directives
Diffstat (limited to 'nimpretty/tests')
-rw-r--r-- | nimpretty/tests/exhaustive.nim | 12 | ||||
-rw-r--r-- | nimpretty/tests/expected/exhaustive.nim | 12 |
2 files changed, 20 insertions, 4 deletions
diff --git a/nimpretty/tests/exhaustive.nim b/nimpretty/tests/exhaustive.nim index cfb42e7a9..ab58b7da4 100644 --- a/nimpretty/tests/exhaustive.nim +++ b/nimpretty/tests/exhaustive.nim @@ -315,9 +315,17 @@ proc f() = # escape char str &= c -const test = r"C:\Users\-\Desktop\test.txt" - proc getKeyAndData(cursor: int, op: int): tuple[key, data: string, success: bool] {.noInit.} = var keyVal: string var dataVal: string + +#!nimpretty off + when stuff: + echo "so nice" + echo "more" + else: + echo "misaligned" +#!nimpretty on + +const test = r"C:\Users\-\Desktop\test.txt" diff --git a/nimpretty/tests/expected/exhaustive.nim b/nimpretty/tests/expected/exhaustive.nim index b9cb2e053..b114e9b8c 100644 --- a/nimpretty/tests/expected/exhaustive.nim +++ b/nimpretty/tests/expected/exhaustive.nim @@ -324,9 +324,17 @@ proc f() = # escape char str &= c -const test = r"C:\Users\-\Desktop\test.txt" - proc getKeyAndData(cursor: int; op: int): tuple[key, data: string; success: bool] {.noInit.} = var keyVal: string var dataVal: string + +#!nimpretty off + when stuff: + echo "so nice" + echo "more" + else: + echo "misaligned" +#!nimpretty on + +const test = r"C:\Users\-\Desktop\test.txt" |