summaryrefslogtreecommitdiff
path: root/yarn.tests/assuming-failure.script
blob: f6302946138a5cb014088fda20f7a60b6b6ebde0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/bin/sh

set -eu


cat <<EOF > "$DATADIR/test.yarn"
    SCENARIO    foo
    ASSUMING    something
    THEN        remember
    FINALLY     cleanup

    IMPLEMENTS ASSUMING something
    false
    IMPLEMENTS THEN remember
    touch "$DATADIR/then-flag"
    IMPLEMENTS FINALLY cleanup
    touch "$DATADIR/cleanup-flag"
EOF

./yarn -q "$DATADIR/test.yarn"
[ ! -e "$DATADIR/then-flag" ]
[ ! -e "$DATADIR/cleanup-flag" ]