From 58d293d6a98b56ed4b309491f09492618c3fa9ec Mon Sep 17 00:00:00 2001 From: alaviss Date: Wed, 26 Dec 2018 03:08:16 +0700 Subject: fixes nim-lang/nimsuggest#76 (#10093) * nimsuggest: prevent out-of-bound access * fixes nim-lang/nimsuggest#76 * undo tester changes --- nimsuggest/tests/ttype_highlight.nim | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 nimsuggest/tests/ttype_highlight.nim (limited to 'nimsuggest/tests') diff --git a/nimsuggest/tests/ttype_highlight.nim b/nimsuggest/tests/ttype_highlight.nim new file mode 100644 index 000000000..e4189a015 --- /dev/null +++ b/nimsuggest/tests/ttype_highlight.nim @@ -0,0 +1,28 @@ +type + TypeA = int + TypeB* = int + TypeC {.unchecked.} = array[1, int] + TypeD[T] = T + TypeE* {.unchecked.} = array[0, int]#[!]# + +discard """ +disabled:true +$nimsuggest --tester $file +>highlight $1 +highlight;;skType;;2;;2;;5 +highlight;;skType;;3;;2;;5 +highlight;;skType;;4;;2;;5 +highlight;;skType;;5;;2;;5 +highlight;;skType;;6;;2;;5 +highlight;;skType;;2;;10;;3 +highlight;;skType;;3;;11;;3 +highlight;;skType;;4;;24;;5 +highlight;;skType;;4;;33;;3 +highlight;;skType;;5;;13;;1 +highlight;;skType;;6;;25;;5 +highlight;;skType;;6;;34;;3 +highlight;;skType;;2;;10;;3 +highlight;;skType;;3;;11;;3 +highlight;;skType;;4;;33;;3 +highlight;;skType;;6;;34;;3 +""" -- cgit 1.4.1-2-gfad0