~dricottone/my-utils

ref: c7e3339c819c6916261fac6e4eed5a9fd7feb554 my-utils/containers/test_swarm-test.sh -rwxr-xr-x 321 bytes
c7e3339cDominic Ricottone Documenting quiet option on rebom 2 years ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/bin/sh
# tests swarm-test

# move to temp directory
cd test

test_exit_code() {
  $1 >/dev/null 2>&1
  if [ $? -ne $2 ]; then
    printf "Failure in swarm-test tests: wrong exit code ('$1' returned '$?', should be '$2')\n"
    exit 1
  fi
}
test_exit_code "../swarm-test -v" "0"
test_exit_code "../swarm-test -h" "0"