From 1e0c838ededf6d7d213c19f4c5b595e195356329 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Tue, 4 Sep 2018 15:03:14 +0300 Subject: Rename .test/test{} to .testscript/testscript{} --- tests/manifest/task-response.testscript | 165 ++++++++++++++++++++++++++++++++ 1 file changed, 165 insertions(+) create mode 100644 tests/manifest/task-response.testscript (limited to 'tests/manifest/task-response.testscript') diff --git a/tests/manifest/task-response.testscript b/tests/manifest/task-response.testscript new file mode 100644 index 0000000..b424cbf --- /dev/null +++ b/tests/manifest/task-response.testscript @@ -0,0 +1,165 @@ +# file : tests/manifest/task-response.testscript +# copyright : Copyright (c) 2014-2018 Code Synthesis Ltd +# license : MIT; see accompanying LICENSE file + +test.options += -ts + +: valid +: +: Roundtrip the task response manifest. +: +{ + : session-not-empty + : + { + : all-values + : + $* <>EOF + : 1 + session: abcd + challenge: cc6585375ef81898cc60791b11852e3d2ed9ebb82ebb0874010fe0e6f9ebdb73 + result-url: https://cppget.org/?build-result + : + name: libfoo + version: 1.0 + repository-url: http://pkg.example.org/1/math + repository-type: pkg + machine: windows_10-msvc_14 + target: x86_64-microsoft-win32-msvc14.0 + EOF + + : no-challenge + : + $* <>EOF + : 1 + session: abcd + result-url: https://cppget.org/?build-result + : + name: libfoo + version: 1.0 + repository-url: http://pkg.example.org/1/math + repository-type: pkg + machine: windows_10-msvc_14 + target: x86_64-microsoft-win32-msvc14.0 + EOF + } + + : session-empty + : + $* <>EOF + : 1 + session: + EOF +} + +: redefinition +: +{ + : session + : + $* <'stdin:3:1: error: task response session redefinition' == 1 + : 1 + session: abcd + session: abcd + EOI + + : challenge + : + $* <'stdin:3:1: error: task response challenge redefinition' == 1 + : 1 + challenge: cc6585375ef81898cc60791b11852e3d2ed9ebb82ebb0874010fe0e6f9ebdb73 + challenge: cc6585375ef81898cc60791b11852e3d2ed9ebb82ebb0874010fe0e6f9ebdb73 + EOI + + : result-url + : + $* <'stdin:3:1: error: task response result url redefinition' == 1 + : 1 + result-url: https://cppget.org/?build-result + result-url: https://cppget.org/?build-result + EOI +} + +: invalid +: +{ + : challenge + : + { + : size + : + $* <'stdin:2:12: error: invalid task response challenge' == 1 + : 1 + challenge: abc + EOI + + : redundant + : + $* <'stdin:4:1: error: unexpected task response challenge' == 1 + : 1 + session: + challenge: cc6585375ef81898cc60791b11852e3d2ed9ebb82ebb0874010fe0e6f9ebdb73 + EOI + } + + : result-url + : + { + : empty + : + $* <'stdin:2:12: error: empty task response result url' == 1 + : 1 + result-url: + EOI + + : redundant + : + $* <'stdin:4:1: error: unexpected task response result url' == 1 + : 1 + session: + result-url: https://cppget.org/?build-result + EOI + } + + : task-unexpected + : + $* <'stdin:3:1: error: single task response manifest expected' == 1 + : 1 + session: + : + EOI +} + +: unknown-name +: +$* <"stdin:2:1: error: unknown name 'x' in task response manifest" == 1 +: 1 +x: +EOI + +: missed +: +{ + : session + : + $* <'stdin:2:1: error: no task response session specified' == 1 + : 1 + EOI + + : result-url + : + $* <'stdin:4:1: error: no task response result url specified' == 1 + : 1 + session: abc + challenge: cc6585375ef81898cc60791b11852e3d2ed9ebb82ebb0874010fe0e6f9ebdb73 + EOI + + : task + : + $* <'stdin:5:1: error: task manifest expected' == 1 + : 1 + session: abcd + challenge: cc6585375ef81898cc60791b11852e3d2ed9ebb82ebb0874010fe0e6f9ebdb73 + result-url: https://cppget.org/?build-result + EOI +} -- cgit v1.1