aboutsummaryrefslogtreecommitdiff
path: root/tests/manifest/result-request.testscript
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2018-09-04 15:03:14 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2018-09-04 15:03:14 +0300
commit1e0c838ededf6d7d213c19f4c5b595e195356329 (patch)
tree142a8e43ec138b5b4a599f46da316fd98d948299 /tests/manifest/result-request.testscript
parente73b2b4a4ed4c814131782572c007f85fbf442a3 (diff)
Rename .test/test{} to .testscript/testscript{}
Diffstat (limited to 'tests/manifest/result-request.testscript')
-rw-r--r--tests/manifest/result-request.testscript106
1 files changed, 106 insertions, 0 deletions
diff --git a/tests/manifest/result-request.testscript b/tests/manifest/result-request.testscript
new file mode 100644
index 0000000..20fbfbb
--- /dev/null
+++ b/tests/manifest/result-request.testscript
@@ -0,0 +1,106 @@
+# file : tests/manifest/result-request.testscript
+# copyright : Copyright (c) 2014-2018 Code Synthesis Ltd
+# license : MIT; see accompanying LICENSE file
+
+test.options += -rq
+
+: valid
+:
+: Roundtrip the result request manifest.
+:
+{
+ : all-values
+ :
+ $* <<EOF >>EOF
+ : 1
+ session: abcd
+ challenge: YQo=
+ :
+ name: libfoo
+ version: 1.0
+ status: error
+ EOF
+
+ : no-challenge
+ :
+ $* <<EOF >>EOF
+ : 1
+ session: abcd
+ :
+ 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: YQo=
+ challenge: YQo=
+ EOI
+}
+
+: invalid
+:
+{
+ : empty-session
+ :
+ $* <<EOI 2>'stdin:2:9: error: empty result request session' == 1
+ : 1
+ session:
+ EOI
+
+ : challenge
+ :
+ $* <<EOI 2>'stdin:2:12: error: invalid result request challenge' == 1
+ : 1
+ challenge: abc
+ EOI
+
+ : empty-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: YQo=
+ EOI
+
+ : result
+ :
+ $* <<EOI 2>'stdin:4:1: error: result manifest expected' == 1
+ : 1
+ session: abc
+ challenge: YQo=
+ EOI
+}