diff options
author | Lukas Fleischer <calcurse@cryptocrack.de> | 2012-02-22 12:43:44 +0100 |
---|---|---|
committer | Lukas Fleischer <calcurse@cryptocrack.de> | 2012-02-24 22:48:26 +0100 |
commit | 80d882d03ddb7eb5807cba13ee74b389846206d4 (patch) | |
tree | 74c55e4a50967dfa3d3703251a7411d75b61c48b | |
parent | 3bc9497fc84abca0493083c3c208f0d2738bed38 (diff) | |
download | calcurse-80d882d03ddb7eb5807cba13ee74b389846206d4.tar.gz calcurse-80d882d03ddb7eb5807cba13ee74b389846206d4.zip |
test/: Run calcurse in read-only mode
We don't change any configuration nor do we modify items here, so we can
safely invoke calcurse in read-only mode. Fixes a couple of permission
errors seen with `make distcheck`.
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
-rwxr-xr-x | test/appointment-001.sh | 2 | ||||
-rwxr-xr-x | test/day-001.sh | 2 | ||||
-rwxr-xr-x | test/day-002.sh | 2 | ||||
-rwxr-xr-x | test/day-003.sh | 4 | ||||
-rwxr-xr-x | test/next-001.sh | 2 | ||||
-rwxr-xr-x | test/range-001.sh | 2 | ||||
-rwxr-xr-x | test/range-002.sh | 2 | ||||
-rwxr-xr-x | test/range-003.sh | 4 | ||||
-rwxr-xr-x | test/search-001.sh | 3 | ||||
-rwxr-xr-x | test/todo-001.sh | 2 | ||||
-rwxr-xr-x | test/todo-002.sh | 2 | ||||
-rwxr-xr-x | test/todo-003.sh | 2 |
12 files changed, 15 insertions, 14 deletions
diff --git a/test/appointment-001.sh b/test/appointment-001.sh index d103acc..27813b3 100755 --- a/test/appointment-001.sh +++ b/test/appointment-001.sh @@ -6,7 +6,7 @@ if [ ! -x "$(command -v faketime)" ]; then fi if [ "$1" = 'actual' ]; then - faketime '2011-02-25 23:42' "$CALCURSE" -D "$DATA_DIR" -a + faketime '2011-02-25 23:42' "$CALCURSE" --read-only -D "$DATA_DIR" -a elif [ "$1" = 'expected' ]; then cat <<EOD 02/25/11: diff --git a/test/day-001.sh b/test/day-001.sh index ef5c212..614f6e3 100755 --- a/test/day-001.sh +++ b/test/day-001.sh @@ -1,7 +1,7 @@ #!/bin/sh if [ "$1" = 'actual' ]; then - "$CALCURSE" -D "$DATA_DIR"/ -d02/25/2011 + "$CALCURSE" --read-only -D "$DATA_DIR"/ -d02/25/2011 elif [ "$1" = 'expected' ]; then cat <<EOD 02/25/11: diff --git a/test/day-002.sh b/test/day-002.sh index ff0e2a6..66ebabd 100755 --- a/test/day-002.sh +++ b/test/day-002.sh @@ -6,7 +6,7 @@ if [ ! -x "$(command -v faketime)" ]; then fi if [ "$1" = 'actual' ]; then - faketime '1912-06-23' "$CALCURSE" -D "$DATA_DIR"/ -d42 + faketime '1912-06-23' "$CALCURSE" --read-only -D "$DATA_DIR"/ -d42 elif [ "$1" = 'expected' ]; then cat <<EOD 06/24/12: diff --git a/test/day-003.sh b/test/day-003.sh index 25fca7d..7534cd8 100755 --- a/test/day-003.sh +++ b/test/day-003.sh @@ -6,9 +6,9 @@ if [ ! -x "$(command -v faketime)" ]; then fi if [ "$1" = 'actual' ]; then - faketime '1912-06-23' "$CALCURSE" -D "$DATA_DIR"/ -d42 + faketime '1912-06-23' "$CALCURSE" --read-only -D "$DATA_DIR"/ -d42 elif [ "$1" = 'expected' ]; then - "$CALCURSE" -D "$DATA_DIR"/ -s06/23/1912 -r42 + "$CALCURSE" --read-only -D "$DATA_DIR"/ -s06/23/1912 -r42 else ./run-test "$0" fi diff --git a/test/next-001.sh b/test/next-001.sh index 5232272..85ebd63 100755 --- a/test/next-001.sh +++ b/test/next-001.sh @@ -6,7 +6,7 @@ if [ ! -x "$(command -v faketime)" ]; then fi if [ "$1" = 'actual' ]; then - faketime '1912-07-10 04:10' "$CALCURSE" -D "$DATA_DIR" -n + faketime '1912-07-10 04:10' "$CALCURSE" --read-only -D "$DATA_DIR" -n elif [ "$1" = 'expected' ]; then cat <<EOD next appointment: diff --git a/test/range-001.sh b/test/range-001.sh index 20afc9e..8f23876 100755 --- a/test/range-001.sh +++ b/test/range-001.sh @@ -6,7 +6,7 @@ if [ ! -x "$(command -v faketime)" ]; then fi if [ "$1" = 'actual' ]; then - faketime '2011-02-25 00:00:00' "$CALCURSE" -D "$DATA_DIR"/ -r + faketime '2011-02-25 00:00:00' "$CALCURSE" --read-only -D "$DATA_DIR"/ -r elif [ "$1" = 'expected' ]; then cat <<EOD 02/25/11: diff --git a/test/range-002.sh b/test/range-002.sh index c3cf112..0610017 100755 --- a/test/range-002.sh +++ b/test/range-002.sh @@ -6,7 +6,7 @@ if [ ! -x "$(command -v faketime)" ]; then fi if [ "$1" = 'actual' ]; then - faketime '2000-01-01 00:00:00' "$CALCURSE" -D "$DATA_DIR"/ -r400 + faketime '2000-01-01 00:00:00' "$CALCURSE" --read-only -D "$DATA_DIR"/ -r400 elif [ "$1" = 'expected' ]; then cat <<EOD 04/07/00: diff --git a/test/range-003.sh b/test/range-003.sh index df68437..a291208 100755 --- a/test/range-003.sh +++ b/test/range-003.sh @@ -6,9 +6,9 @@ if [ ! -x "$(command -v faketime)" ]; then fi if [ "$1" = 'actual' ]; then - faketime '2000-01-01 00:00:00' "$CALCURSE" -D "$DATA_DIR"/ -r400 + faketime '2000-01-01 00:00:00' "$CALCURSE" --read-only -D "$DATA_DIR"/ -r400 elif [ "$1" = 'expected' ]; then - "$CALCURSE" -D "$DATA_DIR"/ -s01/01/2000 -r400 + "$CALCURSE" --read-only -D "$DATA_DIR"/ -s01/01/2000 -r400 else ./run-test "$0" fi diff --git a/test/search-001.sh b/test/search-001.sh index c625286..2d8f7e8 100755 --- a/test/search-001.sh +++ b/test/search-001.sh @@ -6,7 +6,8 @@ if [ ! -x "$(command -v faketime)" ]; then fi if [ "$1" = 'actual' ]; then - "$CALCURSE" -D "$DATA_DIR"/ -s01/01/1902 -r36500 -S '^[KMS]an.*or' + "$CALCURSE" --read-only -D "$DATA_DIR"/ -s01/01/1902 -r36500 \ + -S '^[KMS]an.*or' elif [ "$1" = 'expected' ]; then cat <<EOD 12/06/42: diff --git a/test/todo-001.sh b/test/todo-001.sh index d1c7433..db6b6ca 100755 --- a/test/todo-001.sh +++ b/test/todo-001.sh @@ -1,7 +1,7 @@ #!/bin/sh if [ "$1" = 'actual' ]; then - "$CALCURSE" -D "$DATA_DIR"/ -t | sort + "$CALCURSE" --read-only -D "$DATA_DIR"/ -t | sort elif [ "$1" = 'expected' ]; then ( echo 'to do:' diff --git a/test/todo-002.sh b/test/todo-002.sh index 8609e22..a91d06d 100755 --- a/test/todo-002.sh +++ b/test/todo-002.sh @@ -1,7 +1,7 @@ #!/bin/sh if [ "$1" = 'actual' ]; then - "$CALCURSE" -D "$DATA_DIR"/ -t3 + "$CALCURSE" --read-only -D "$DATA_DIR"/ -t3 elif [ "$1" = 'expected' ]; then echo 'to do:' sed -n 's/^\[3\] \(.*\)/3. \1/p' "$DATA_DIR"/todo diff --git a/test/todo-003.sh b/test/todo-003.sh index ff8f8e6..2dcb2d3 100755 --- a/test/todo-003.sh +++ b/test/todo-003.sh @@ -1,7 +1,7 @@ #!/bin/sh if [ "$1" = 'actual' ]; then - "$CALCURSE" -D "$DATA_DIR"/ -t0 | sort -n + "$CALCURSE" --read-only -D "$DATA_DIR"/ -t0 | sort -n elif [ "$1" = 'expected' ]; then ( echo 'completed tasks:' |