File: nominalCase.sh

package info (click to toggle)
urlwatch 2.29-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 880 kB
  • sloc: python: 4,003; sh: 53; makefile: 19
file content (20 lines) | stat: -rw-r--r-- 550 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#! /bin/bash
set -uo pipefail

testWarnOnEmptyConfig() {
    export HOME=$AUTOPKGTEST_TMP
    urlwatch
    result=$?
    assertEquals "On first launch urlwatch should return an exit code 1 due to lack of config file" 1 $result
}

testWithUrlfile(){
    export HOME=$AUTOPKGTEST_TMP
    echo -e "---\nname: \"tmp listing\"\ncommand: \"ls -al $AUTOPKGTEST_TMP\"" > "$AUTOPKGTEST_TMP/urls.json"
    urlwatch --urls "$AUTOPKGTEST_TMP/urls.json"
    result=$?
    assertEquals "Urlwatch should return an exit code 0" 0 $result
}

# load shunit2
. shunit2