~dricottone/my-utils

ref: 6d42c5ec7a44590c7b46cce84cb3c877fe81823f my-utils/display/test_check-x.sh -rwxr-xr-x 269 bytes
6d42c5ecDominic Ricottone rmold update 2 years ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
#!/bin/sh
# tests check-x

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