diff options
author | Karen Arutyunov <karen@codesynthesis.com> | 2017-03-29 00:45:30 +0300 |
---|---|---|
committer | Karen Arutyunov <karen@codesynthesis.com> | 2017-04-04 13:35:14 +0300 |
commit | dd973d03bf5f3f439dcdacbb22470105e66e698a (patch) | |
tree | 6856ab313c75f3459df80511c98d3f788bf1c22b /tests/manifest/task-response.test | |
parent | c72bbd5d04084547c53e9593af4d76d9e5135a53 (diff) |
Implement manifests and build_config
Diffstat (limited to 'tests/manifest/task-response.test')
-rw-r--r-- | tests/manifest/task-response.test | 114 |
1 files changed, 114 insertions, 0 deletions
diff --git a/tests/manifest/task-response.test b/tests/manifest/task-response.test new file mode 100644 index 0000000..472cca7 --- /dev/null +++ b/tests/manifest/task-response.test @@ -0,0 +1,114 @@ +# file : tests/manifest/task-response.test +# copyright : Copyright (c) 2014-2017 Code Synthesis Ltd +# license : MIT; see accompanying LICENSE file + +test.options += -ts + +: valid +: +: Roundtrip the task response manifest. +: +{ + : session-not-empty + : + $* <<EOF >>EOF + : 1 + session: abcd + challenge: xyz + : + name: libfoo + version: 1.0 + repository: http://pkg.example.org/1/math + machine: windows_10-msvc_14 + EOF + + : session-empty + : + $* <<EOF >>EOF + : 1 + session: + EOF +} + +: redefinition +: +{ + : session + : + $* <<EOI 2>'stdin:3:1: error: task response session redefinition' == 1 + : 1 + session: abcd + session: abcd + EOI + + : challenge + : + $* <<EOI 2>'stdin:3:1: error: task response challenge redefinition' == 1 + : 1 + challenge: xyz + challenge: xyz + EOI +} + +: invalid +: +{ + : challenge + : + { + : empty + : + $* <<EOI 2>'stdin:2:11: error: empty task response challenge' == 1 + : 1 + challenge: + EOI + + : redundant + : + $* <<EOI 2>'stdin:4:1: error: unexpected task response challenge' == 1 + : 1 + session: + challenge: abc + EOI + } + + : task-unexpected + : + $* <<EOI 2>'stdin:3:1: error: single task response manifest expected' == 1 + : 1 + session: + : + EOI +} + +: unknown-name +: +$* <<EOI 2>"stdin:2:1: error: unknown name 'x' in task response manifest" == 1 +: 1 +x: +EOI + +: missed +: +{ + : session + : + $* <<EOI 2>'stdin:2:1: error: no task response session specified' == 1 + : 1 + EOI + + : challenge + : + $* <<EOI 2>'stdin:3:1: error: no task response challenge specified' == 1 + : 1 + session: abc + EOI + + : task + : + $* <<EOI 2>'stdin:4:1: error: task manifest expected' == 1 + : 1 + session: abcd + challenge: xyz + EOI +} |