From 6796698c9945d87236ffcc939137d0919ef04931 Mon Sep 17 00:00:00 2001 From: Pádraig Brady Date: Tue, 27 Oct 2015 13:13:59 +0000 Subject: all: quote string arguments in error messages These strings are often file names or other user specified parameters, which can give confusing errors in the presence of unexpected characters for example. * cfg.mk (sc_error_quotes): A new syntax check rule. * src/*.c: Wrap error() string arguments with quote(). * tests/: Adjust accordingly. * NEWS: Mention the improvement. --- tests/misc/tsort.pl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'tests/misc/tsort.pl') diff --git a/tests/misc/tsort.pl b/tests/misc/tsort.pl index 4d04866ad..60f22c43c 100755 --- a/tests/misc/tsort.pl +++ b/tests/misc/tsort.pl @@ -27,10 +27,10 @@ my @Tests = ( ['cycle-1', {IN => {f => "t b\nt s\ns t\n"}}, {OUT => "s\nt\nb\n"}, {EXIT => 1}, - {ERR => "tsort: f: input contains a loop:\ntsort: s\ntsort: t\n"} ], + {ERR => "tsort: 'f': input contains a loop:\ntsort: s\ntsort: t\n"} ], ['cycle-2', {IN => {f => "t x\nt s\ns t\n"}}, {OUT => "s\nt\nx\n"}, {EXIT => 1}, - {ERR => "tsort: f: input contains a loop:\ntsort: s\ntsort: t\n"} ], + {ERR => "tsort: 'f': input contains a loop:\ntsort: s\ntsort: t\n"} ], ['posix-1', {IN => "a b c c d e\ng g\nf g e f\nh h\n"}, {OUT => "a\nc\nd\nh\nb\ne\nf\ng\n"}], @@ -50,7 +50,7 @@ my @Tests = # copy of the final token were appended. ['odd', {IN => "a\n"}, {EXIT => 1}, - {ERR => "tsort: odd.1: input contains an odd number of tokens\n"}], + {ERR => "tsort: 'odd.1': input contains an odd number of tokens\n"}], ['only-one', {IN => {f => ""}}, {IN => {g => ""}}, {EXIT => 1}, -- cgit v1.2.3-54-g00ecf