File: task.yaml

package info (click to toggle)
snapd 2.71-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 79,536 kB
  • sloc: ansic: 16,114; sh: 16,105; python: 9,941; makefile: 1,890; exp: 190; awk: 40; xml: 22
file content (23 lines) | stat: -rw-r--r-- 879 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
summary: shell is tricky

details: |
    Shell can be surprisingly tricky. This test captures some of the things
    we've learned and now guard against. The test is expected to pass all the
    time, it simply contains "executable documentation" that is meant to
    illustrate how non-obvious some behavior is.

# 1: increment if you had to read this or edit this
execute: |
    # NOTE: Disable set -e that was implicitly provided by spread and check for
    # errors explicitly. This allows us to to be verify the exit code of each
    # test *without* falling into one of the traps of shell negation.
    set +e
    ./set-e-pipe-chain-with-negation.sh
    test $? -eq 0 || exit 1
    ./set-e-pipe-chain-with-not.sh
    test $? -eq 1 || exit 1
    ./set-e-simple-cmd-with-negation.sh
    test $? -eq 0 || exit 1
    ./set-e-simple-cmd-with-not.sh
    test $? -eq 1 || exit 1