From 76d4dbae698e74be2b26e09bcc16a5384d901d8f Mon Sep 17 00:00:00 2001 From: Timothee Cour Date: Sat, 28 Nov 2020 01:04:31 -0800 Subject: [PATCH] address comment --- testament/testament.nim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testament/testament.nim b/testament/testament.nim index 95f345ab0b44..136cf2b0058a 100644 --- a/testament/testament.nim +++ b/testament/testament.nim @@ -402,7 +402,7 @@ proc codegenCheck(test: TTest, target: TTarget, spec: TSpec, expectedMsg: var st let genFile = generatedFile(test, target) let contents = readFile(genFile).string for check in spec.ccodeCheck: - if check[0] == '\\': + if check.len > 0 and check[0] == '\\': # little hack to get 'match' support: if not contents.match(check.peg): given.err = reCodegenFailure