diff options
Diffstat (limited to 'tests/manifest/result-request.test')
-rw-r--r-- | tests/manifest/result-request.test | 92 |
1 files changed, 92 insertions, 0 deletions
diff --git a/tests/manifest/result-request.test b/tests/manifest/result-request.test new file mode 100644 index 0000000..8cf64b9 --- /dev/null +++ b/tests/manifest/result-request.test @@ -0,0 +1,92 @@ +# file : tests/manifest/result-request.test +# copyright : Copyright (c) 2014-2017 Code Synthesis Ltd +# license : MIT; see accompanying LICENSE file + +test.options += -rq + +: valid +: +: Roundtrip the result request manifest. +: +{ + $* <<EOF >>EOF + : 1 + session: abcd + challenge: xyz + : + name: libfoo + version: 1.0 + status: error + EOF +} + +: redefinition +: +{ + : session + : + $* <<EOI 2>'stdin:3:1: error: result request session redefinition' == 1 + : 1 + session: abcd + session: abcd + EOI + + : challenge + : + $* <<EOI 2>'stdin:3:1: error: result request challenge redefinition' == 1 + : 1 + challenge: xyz + challenge: xyz + EOI +} + +: empty +: +{ + : session + : + $* <<EOI 2>'stdin:2:9: error: empty result request session' == 1 + : 1 + session: + EOI + + : challenge + : + $* <<EOI 2>'stdin:2:11: error: empty result request challenge' == 1 + : 1 + challenge: + EOI +} + +: unknown-name +: +$* <<EOI 2>"stdin:2:1: error: unknown name 'x' in result request manifest" == 1 +: 1 +x: +EOI + +: missed +: +{ + : session + : + $* <<EOI 2>'stdin:3:1: error: no result request session specified' == 1 + : 1 + challenge: xyz + EOI + + : challenge + : + $* <<EOI 2>'stdin:3:1: error: no result request challenge specified' == 1 + : 1 + session: abc + EOI + + : result + : + $* <<EOI 2>'stdin:4:1: error: result manifest expected' == 1 + : 1 + session: abc + challenge: xyz + EOI +} |