From 5c186f901ea7d1b09ab551a3fd2a6c1fd2426d59 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Tue, 20 Jun 2017 20:33:52 +0300 Subject: Add support for build configuration warning-detecting regexes --- tests/manifest/task.test | 32 +++++++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) (limited to 'tests') diff --git a/tests/manifest/task.test b/tests/manifest/task.test index f2afd9c..95bb749 100644 --- a/tests/manifest/task.test +++ b/tests/manifest/task.test @@ -21,6 +21,7 @@ test.options += -t machine: windows_10-msvc_14 target: x86_64-microsoft-win32-msvc14.0 config: config.cc.coptions=/Z7 config.cc.loptions=/DEBUG + warning-regex: '^warning: ' '^.+: warning: ' EOF : no-target @@ -32,9 +33,10 @@ test.options += -t repository: http://pkg.example.org/1/math machine: windows_10-msvc_14 config: config.cc.coptions=/Z7 config.cc.loptions=/DEBUG + warning-regex: '^warning: ' '^.+: warning: ' EOF - : no-config + : no-config-no-regex : $* <>EOF : 1 @@ -135,6 +137,14 @@ test.options += -t config: config.cc.coptions=/Z7 config: config.cc.loptions=/DEBUG EOI + + : warning-regex + : + $* <'stdin:3:1: error: task warning regex redefinition' == 1 + : 1 + warning-regex: '^warning: ' + warning-regex: '^.+: warning: ' + EOI } : invalid @@ -237,6 +247,26 @@ test.options += -t } } + : warning-regex + : + { + : empty + : + $* <'stdin:2:15: error: empty task warning regex' == 1 + : 1 + warning-regex: + EOI + + : regex-error + : + $* <>~/EOE/ == 1 + : 1 + warning-regex: '^[warning: ' + EOI + /stdin:2:16: error: invalid task warning regex: invalid regex.*/ + EOE + } + : trust : $* <'stdin:2:8: error: invalid repository certificate fingerprint' == 1 -- cgit v1.1