aboutsummaryrefslogtreecommitdiff
path: root/tests/manifest/result-request.test
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2017-03-29 00:45:30 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2017-04-04 13:35:14 +0300
commitdd973d03bf5f3f439dcdacbb22470105e66e698a (patch)
tree6856ab313c75f3459df80511c98d3f788bf1c22b /tests/manifest/result-request.test
parentc72bbd5d04084547c53e9593af4d76d9e5135a53 (diff)
Implement manifests and build_config
Diffstat (limited to 'tests/manifest/result-request.test')
-rw-r--r--tests/manifest/result-request.test92
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
+}