diff options
author | Karen Arutyunov <karen@codesynthesis.com> | 2018-09-04 15:03:14 +0300 |
---|---|---|
committer | Karen Arutyunov <karen@codesynthesis.com> | 2018-09-04 15:03:14 +0300 |
commit | 1e0c838ededf6d7d213c19f4c5b595e195356329 (patch) | |
tree | 142a8e43ec138b5b4a599f46da316fd98d948299 /tests/manifest/result.testscript | |
parent | e73b2b4a4ed4c814131782572c007f85fbf442a3 (diff) |
Rename .test/test{} to .testscript/testscript{}
Diffstat (limited to 'tests/manifest/result.testscript')
-rw-r--r-- | tests/manifest/result.testscript | 230 |
1 files changed, 230 insertions, 0 deletions
diff --git a/tests/manifest/result.testscript b/tests/manifest/result.testscript new file mode 100644 index 0000000..a3c35a9 --- /dev/null +++ b/tests/manifest/result.testscript @@ -0,0 +1,230 @@ +# file : tests/manifest/result.testscript +# copyright : Copyright (c) 2014-2018 Code Synthesis Ltd +# license : MIT; see accompanying LICENSE file + +test.options += -r + +: valid +: +: Roundtrip the result manifest. +: +{ + : test-error + : + $* <<EOF >>EOF + : 1 + name: libfoo + version: 1.0 + status: error + configure-status: success + update-status: warning + test-status: error + configure-log: \ + conf line 1 + conf line 2 + \ + update-log: \ + update line 1 + update line 2 + \ + test-log: \ + test line 1 + test line 2 + \ + EOF + + : update-error + : + $* <<EOF >>EOF + : 1 + name: libfoo + version: 1.0 + status: error + configure-status: warning + update-status: error + configure-log: \ + conf line 1 + conf line 2 + \ + update-log: \ + update line 1 + update line 2 + \ + EOF + + : early-abort + : + $* <<EOF >>EOF + : 1 + name: libfoo + version: 1.0 + status: abort + EOF +} + +: redefinition +: +{ + : name + : + $* <<EOI 2>'stdin:3:1: error: result package name redefinition' == 1 + : 1 + name: libfoo + name: libfoo + EOI + + : version + : + $* <<EOI 2>'stdin:3:1: error: result package version redefinition' == 1 + : 1 + version: 1.0 + version: 1.0 + EOI + + : status + : + $* <<EOI 2>'stdin:3:1: error: result status redefinition' == 1 + : 1 + status: success + status: error + EOI + + : configure-status + : + $* <<EOI 2>'stdin:4:1: error: result configure-status redefinition' == 1 + : 1 + status: success + configure-status: success + configure-status: abnormal + EOI + + : configure-log + : + $* <<EOI 2>'stdin:5:1: error: unexpected configure-log' == 1 + : 1 + status: success + configure-status: success + configure-log: configured + configure-log: configured + EOI +} + +: invalid +: +{ + : name-empty + : + $* <<EOI 2>'stdin:2:6: error: invalid result package name: length is less than two characters' == 1 + : 1 + name: + EOI + + : version + : + { + : empty + : + $* <<EOI 2>'stdin:2:9: error: invalid result package version: unexpected end' == 1 + : 1 + version: + EOI + + : release + : + $* <<EOI 2>'stdin:2:10: error: invalid result package version release' == 1 + : 1 + version: 1.2.3- + EOI + } + + : status + : + $* <<EOI 2>'stdin:2:9: error: invalid result status' == 1 + : 1 + status: alert + EOI + + : configure-status + : + $* <<EOI 2>'stdin:3:19: error: invalid configure-status' == 1 + : 1 + status: abort + configure-status: alert + EOI + + : order + : + { + : op-status-before-status + : + $* <<EOI 2>'stdin:2:1: error: result status must appear first' == 1 + : 1 + configure-status: success + EOI + + : op-status-after-log + : + $* <<EOI 2>'stdin:5:1: error: update-status after operations logs' == 1 + : 1 + status: success + configure-status: success + configure-log: log + update-status: error + EOI + + : wrong-op-log + : + $* <<EOI 2>'stdin:5:1: error: configure-log is expected' == 1 + : 1 + status: success + configure-status: success + update-status: error + update-log: log + EOI + } +} + +: unknown-name +: +$* <<EOI 2>"stdin:2:1: error: unknown name 'full-logs' in result manifest" == 1 +: 1 +full-logs: log +EOI + +: missed +: +{ + : name + : + $* <<EOI 2>'stdin:4:1: error: no result package name specified' == 1 + : 1 + version: 1.0 + status: success + EOI + + : version + : + $* <<EOI 2>'stdin:4:1: error: no result package version specified' == 1 + : 1 + name: libfoo + status: success + EOI + + : status + : + $* <<EOI 2>'stdin:4:1: error: no result status specified' == 1 + : 1 + name: libfoo + version: 1.0 + EOI + + : configure-log + : + $* <<EOI 2>'stdin:6:1: error: no result configure-log specified' == 1 + : 1 + name: libfoo + version: 1.0 + status: error + configure-status: error + EOI +} |