Debian Codegraph @

tests/f/repeated-items/00-one.t

raw
1 #!/usr/bin/env bash
2 # THIS FILE IS PART OF THE CYLC WORKFLOW ENGINE.
3 # Copyright (C) NIWA & British Crown (Met Office) & Contributors.
4 #
5 # This program is free software: you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation, either version 3 of the License, or
8 # (at your option) any later version.
9 #
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 # GNU General Public License for more details.
14 #
15 # You should have received a copy of the GNU General Public License
16 # along with this program. If not, see <http://www.gnu.org/licenses/>.
17 #-------------------------------------------------------------------------------
18 # Test repeated item override and repeated graph string merge
19 . "$(dirname "$0")/test_header"
20 #-------------------------------------------------------------------------------
21 set_test_number 7
22 #-------------------------------------------------------------------------------
23 install_workflow "${TEST_NAME_BASE}" one
24 #-------------------------------------------------------------------------------
25 TEST_NAME="${TEST_NAME_BASE}-validate"
26 run_ok "${TEST_NAME}" cylc validate "${WORKFLOW_NAME}"
27 #-------------------------------------------------------------------------------
28 TEST_NAME=${TEST_NAME_BASE}-a
29 cylc config -i [meta]title "${WORKFLOW_NAME}" >a.txt 2>/dev/null
30 cmp_ok a.txt <<'__END'
31 the quick brown fox
32 __END
33 #-------------------------------------------------------------------------------
34 TEST_NAME="${TEST_NAME_BASE}-b"
35 cylc config -i '[scheduling][graph]R1' "${WORKFLOW_NAME}" | sort \
36 >'b.txt' 2>'/dev/null'
37 cmp_ok 'b.txt' <<'__END'
38 bar => baz
39 foo => bar
40 __END
41 #-------------------------------------------------------------------------------
42 TEST_NAME="${TEST_NAME_BASE}-c"
43 cylc config -i '[scheduling][graph]T00' "${WORKFLOW_NAME}" | sort \
44 >'c.txt' 2>'/dev/null'
45 cmp_ok 'c.txt' <<'__END'
46 cbar => cbaz
47 cfoo => cbar
48 dbar => dbaz
49 dfoo => dbar
50 __END
51 #-------------------------------------------------------------------------------
52 TEST_NAME=${TEST_NAME_BASE}-d
53 cylc config -i '[runtime][FOO][meta]title' "${WORKFLOW_NAME}" >d.txt 2>/dev/null
54 cmp_ok d.txt <<'__END'
55 the quick brown fox
56 __END
57 #-------------------------------------------------------------------------------
58 TEST_NAME=${TEST_NAME_BASE}-e
59 cylc config -i '[runtime][FOO][meta]description' "${WORKFLOW_NAME}" >e.txt 2>/dev/null
60 cmp_ok e.txt <<'__END'
61 jumped over the lazy dog
62 __END
63 #-------------------------------------------------------------------------------
64 TEST_NAME=${TEST_NAME_BASE}-f
65 cylc config -i '[runtime][FOO][environment]' "${WORKFLOW_NAME}" >f.txt 2>/dev/null
66 cmp_ok f.txt <<'__END'
67 VAR1 = the quick brown fox
68 __END
69 #-------------------------------------------------------------------------------
70 purge