mirror of
https://salsa.debian.org/dskoll/remind.git
synced 2026-04-17 06:48:47 +02:00
Spit out errors if we can't open a non-readable file in a dir/*.rem.
This commit is contained in:
@@ -12,7 +12,9 @@ a program to be executed.
|
||||
.PP
|
||||
If \fIfilename\fR is specified as a single dash '-', then \fBRemind\fR
|
||||
takes its input from standard input. This also implicitly enables
|
||||
the \fB\-o\fR option, described below. If \fIfilename\fR happens to
|
||||
the \fB\-o\fR option, described below.
|
||||
.PP
|
||||
If \fIfilename\fR happens to
|
||||
be a directory rather than a plain file, then \fBRemind\fR reads all of
|
||||
the files in that directory that match the pattern "*.rem". The files
|
||||
are read in sorted order; the sort order may depend on your locale, but
|
||||
|
||||
@@ -360,6 +360,8 @@ static int NextChainedFile(IncludeStruct *i)
|
||||
i->chain = i->chain->next;
|
||||
if (OpenFile(cur->filename) == OK) {
|
||||
return OK;
|
||||
} else {
|
||||
Eprint("%s: %s", ErrMsg[E_CANT_OPEN], cur->filename);
|
||||
}
|
||||
}
|
||||
return E_EOF;
|
||||
|
||||
1
tests/include_dir/04cantread.rem
Normal file
1
tests/include_dir/04cantread.rem
Normal file
@@ -0,0 +1 @@
|
||||
REM 15 MSG You can't read this file.
|
||||
@@ -18,6 +18,7 @@ if test $? != 0 ; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
chmod 000 include_dir/04cantread.rem
|
||||
TEST_GETENV="foo bar baz" ; export TEST_GETENV
|
||||
echo "Test 1" > ../tests/test.out
|
||||
echo "" >> ../tests/test.out
|
||||
@@ -46,7 +47,7 @@ echo "" >> ../tests/test.out
|
||||
|
||||
echo "Test 8" >> ../tests/test.out
|
||||
echo "" >> ../tests/test.out
|
||||
../src/remind -p -l -b2 ../tests/include_dir 1 aug 2007 >> ../tests/test.out
|
||||
../src/remind -p -l -b2 ../tests/include_dir 1 aug 2007 >> ../tests/test.out 2>&1
|
||||
|
||||
echo "Test 9" >> ../tests/test.out
|
||||
echo "" >> ../tests/test.out
|
||||
@@ -54,6 +55,8 @@ echo "" >> ../tests/test.out
|
||||
../src/remind -p -l -b2 ../tests/include_dir_no_rems 1 aug 2007 >> ../tests/test.out 2>&1
|
||||
../src/remind -p -l -b2 ../tests/include_test.rem 1 aug 2007 >> ../tests/test.out 2>&1
|
||||
|
||||
chmod 644 include_dir/04cantread.rem
|
||||
|
||||
cmp -s ../tests/test.out ../tests/test.cmp
|
||||
if [ "$?" = "0" ]; then
|
||||
echo "Remind: Acceptance test PASSED"
|
||||
|
||||
@@ -1335,6 +1335,37 @@ September 30
|
||||
# rem2ps end
|
||||
Test 8
|
||||
|
||||
../tests/include_dir/02.rem(1): Can't open file: ../tests/include_dir/04cantread.rem
|
||||
../tests/include_dir/02.rem(1): Can't open file: ../tests/include_dir/04cantread.rem
|
||||
../tests/include_dir/02.rem(1): Can't open file: ../tests/include_dir/04cantread.rem
|
||||
../tests/include_dir/02.rem(1): Can't open file: ../tests/include_dir/04cantread.rem
|
||||
../tests/include_dir/02.rem(1): Can't open file: ../tests/include_dir/04cantread.rem
|
||||
../tests/include_dir/02.rem(1): Can't open file: ../tests/include_dir/04cantread.rem
|
||||
../tests/include_dir/02.rem(1): Can't open file: ../tests/include_dir/04cantread.rem
|
||||
../tests/include_dir/02.rem(1): Can't open file: ../tests/include_dir/04cantread.rem
|
||||
../tests/include_dir/02.rem(1): Can't open file: ../tests/include_dir/04cantread.rem
|
||||
../tests/include_dir/02.rem(1): Can't open file: ../tests/include_dir/04cantread.rem
|
||||
../tests/include_dir/02.rem(1): Can't open file: ../tests/include_dir/04cantread.rem
|
||||
../tests/include_dir/02.rem(1): Can't open file: ../tests/include_dir/04cantread.rem
|
||||
../tests/include_dir/02.rem(1): Can't open file: ../tests/include_dir/04cantread.rem
|
||||
../tests/include_dir/02.rem(1): Can't open file: ../tests/include_dir/04cantread.rem
|
||||
../tests/include_dir/02.rem(1): Can't open file: ../tests/include_dir/04cantread.rem
|
||||
../tests/include_dir/02.rem(1): Can't open file: ../tests/include_dir/04cantread.rem
|
||||
../tests/include_dir/02.rem(1): Can't open file: ../tests/include_dir/04cantread.rem
|
||||
../tests/include_dir/02.rem(1): Can't open file: ../tests/include_dir/04cantread.rem
|
||||
../tests/include_dir/02.rem(1): Can't open file: ../tests/include_dir/04cantread.rem
|
||||
../tests/include_dir/02.rem(1): Can't open file: ../tests/include_dir/04cantread.rem
|
||||
../tests/include_dir/02.rem(1): Can't open file: ../tests/include_dir/04cantread.rem
|
||||
../tests/include_dir/02.rem(1): Can't open file: ../tests/include_dir/04cantread.rem
|
||||
../tests/include_dir/02.rem(1): Can't open file: ../tests/include_dir/04cantread.rem
|
||||
../tests/include_dir/02.rem(1): Can't open file: ../tests/include_dir/04cantread.rem
|
||||
../tests/include_dir/02.rem(1): Can't open file: ../tests/include_dir/04cantread.rem
|
||||
../tests/include_dir/02.rem(1): Can't open file: ../tests/include_dir/04cantread.rem
|
||||
../tests/include_dir/02.rem(1): Can't open file: ../tests/include_dir/04cantread.rem
|
||||
../tests/include_dir/02.rem(1): Can't open file: ../tests/include_dir/04cantread.rem
|
||||
../tests/include_dir/02.rem(1): Can't open file: ../tests/include_dir/04cantread.rem
|
||||
../tests/include_dir/02.rem(1): Can't open file: ../tests/include_dir/04cantread.rem
|
||||
../tests/include_dir/02.rem(1): Can't open file: ../tests/include_dir/04cantread.rem
|
||||
# rem2ps begin
|
||||
August 2007 31 3 0
|
||||
Sunday Monday Tuesday Wednesday Thursday Friday Saturday
|
||||
@@ -1361,66 +1392,97 @@ August 2007 31 3 0
|
||||
Sunday Monday Tuesday Wednesday Thursday Friday Saturday
|
||||
July 31
|
||||
September 30
|
||||
include_dir/02.rem(1): Can't open file: include_dir/04cantread.rem
|
||||
../tests/include_test.rem(2): include_dir_no_rems: No files matching *.rem
|
||||
../tests/include_test.rem(3): Can't open file: nonexistent_include_dir
|
||||
include_dir/02.rem(1): Can't open file: include_dir/04cantread.rem
|
||||
../tests/include_test.rem(2): include_dir_no_rems: No files matching *.rem
|
||||
../tests/include_test.rem(3): Can't open file: nonexistent_include_dir
|
||||
include_dir/02.rem(1): Can't open file: include_dir/04cantread.rem
|
||||
../tests/include_test.rem(2): include_dir_no_rems: No files matching *.rem
|
||||
../tests/include_test.rem(3): Can't open file: nonexistent_include_dir
|
||||
include_dir/02.rem(1): Can't open file: include_dir/04cantread.rem
|
||||
../tests/include_test.rem(2): include_dir_no_rems: No files matching *.rem
|
||||
../tests/include_test.rem(3): Can't open file: nonexistent_include_dir
|
||||
include_dir/02.rem(1): Can't open file: include_dir/04cantread.rem
|
||||
../tests/include_test.rem(2): include_dir_no_rems: No files matching *.rem
|
||||
../tests/include_test.rem(3): Can't open file: nonexistent_include_dir
|
||||
include_dir/02.rem(1): Can't open file: include_dir/04cantread.rem
|
||||
../tests/include_test.rem(2): include_dir_no_rems: No files matching *.rem
|
||||
../tests/include_test.rem(3): Can't open file: nonexistent_include_dir
|
||||
include_dir/02.rem(1): Can't open file: include_dir/04cantread.rem
|
||||
../tests/include_test.rem(2): include_dir_no_rems: No files matching *.rem
|
||||
../tests/include_test.rem(3): Can't open file: nonexistent_include_dir
|
||||
include_dir/02.rem(1): Can't open file: include_dir/04cantread.rem
|
||||
../tests/include_test.rem(2): include_dir_no_rems: No files matching *.rem
|
||||
../tests/include_test.rem(3): Can't open file: nonexistent_include_dir
|
||||
include_dir/02.rem(1): Can't open file: include_dir/04cantread.rem
|
||||
../tests/include_test.rem(2): include_dir_no_rems: No files matching *.rem
|
||||
../tests/include_test.rem(3): Can't open file: nonexistent_include_dir
|
||||
include_dir/02.rem(1): Can't open file: include_dir/04cantread.rem
|
||||
../tests/include_test.rem(2): include_dir_no_rems: No files matching *.rem
|
||||
../tests/include_test.rem(3): Can't open file: nonexistent_include_dir
|
||||
include_dir/02.rem(1): Can't open file: include_dir/04cantread.rem
|
||||
../tests/include_test.rem(2): include_dir_no_rems: No files matching *.rem
|
||||
../tests/include_test.rem(3): Can't open file: nonexistent_include_dir
|
||||
include_dir/02.rem(1): Can't open file: include_dir/04cantread.rem
|
||||
../tests/include_test.rem(2): include_dir_no_rems: No files matching *.rem
|
||||
../tests/include_test.rem(3): Can't open file: nonexistent_include_dir
|
||||
include_dir/02.rem(1): Can't open file: include_dir/04cantread.rem
|
||||
../tests/include_test.rem(2): include_dir_no_rems: No files matching *.rem
|
||||
../tests/include_test.rem(3): Can't open file: nonexistent_include_dir
|
||||
include_dir/02.rem(1): Can't open file: include_dir/04cantread.rem
|
||||
../tests/include_test.rem(2): include_dir_no_rems: No files matching *.rem
|
||||
../tests/include_test.rem(3): Can't open file: nonexistent_include_dir
|
||||
include_dir/02.rem(1): Can't open file: include_dir/04cantread.rem
|
||||
../tests/include_test.rem(2): include_dir_no_rems: No files matching *.rem
|
||||
../tests/include_test.rem(3): Can't open file: nonexistent_include_dir
|
||||
include_dir/02.rem(1): Can't open file: include_dir/04cantread.rem
|
||||
../tests/include_test.rem(2): include_dir_no_rems: No files matching *.rem
|
||||
../tests/include_test.rem(3): Can't open file: nonexistent_include_dir
|
||||
include_dir/02.rem(1): Can't open file: include_dir/04cantread.rem
|
||||
../tests/include_test.rem(2): include_dir_no_rems: No files matching *.rem
|
||||
../tests/include_test.rem(3): Can't open file: nonexistent_include_dir
|
||||
include_dir/02.rem(1): Can't open file: include_dir/04cantread.rem
|
||||
../tests/include_test.rem(2): include_dir_no_rems: No files matching *.rem
|
||||
../tests/include_test.rem(3): Can't open file: nonexistent_include_dir
|
||||
include_dir/02.rem(1): Can't open file: include_dir/04cantread.rem
|
||||
../tests/include_test.rem(2): include_dir_no_rems: No files matching *.rem
|
||||
../tests/include_test.rem(3): Can't open file: nonexistent_include_dir
|
||||
include_dir/02.rem(1): Can't open file: include_dir/04cantread.rem
|
||||
../tests/include_test.rem(2): include_dir_no_rems: No files matching *.rem
|
||||
../tests/include_test.rem(3): Can't open file: nonexistent_include_dir
|
||||
include_dir/02.rem(1): Can't open file: include_dir/04cantread.rem
|
||||
../tests/include_test.rem(2): include_dir_no_rems: No files matching *.rem
|
||||
../tests/include_test.rem(3): Can't open file: nonexistent_include_dir
|
||||
include_dir/02.rem(1): Can't open file: include_dir/04cantread.rem
|
||||
../tests/include_test.rem(2): include_dir_no_rems: No files matching *.rem
|
||||
../tests/include_test.rem(3): Can't open file: nonexistent_include_dir
|
||||
include_dir/02.rem(1): Can't open file: include_dir/04cantread.rem
|
||||
../tests/include_test.rem(2): include_dir_no_rems: No files matching *.rem
|
||||
../tests/include_test.rem(3): Can't open file: nonexistent_include_dir
|
||||
include_dir/02.rem(1): Can't open file: include_dir/04cantread.rem
|
||||
../tests/include_test.rem(2): include_dir_no_rems: No files matching *.rem
|
||||
../tests/include_test.rem(3): Can't open file: nonexistent_include_dir
|
||||
include_dir/02.rem(1): Can't open file: include_dir/04cantread.rem
|
||||
../tests/include_test.rem(2): include_dir_no_rems: No files matching *.rem
|
||||
../tests/include_test.rem(3): Can't open file: nonexistent_include_dir
|
||||
include_dir/02.rem(1): Can't open file: include_dir/04cantread.rem
|
||||
../tests/include_test.rem(2): include_dir_no_rems: No files matching *.rem
|
||||
../tests/include_test.rem(3): Can't open file: nonexistent_include_dir
|
||||
include_dir/02.rem(1): Can't open file: include_dir/04cantread.rem
|
||||
../tests/include_test.rem(2): include_dir_no_rems: No files matching *.rem
|
||||
../tests/include_test.rem(3): Can't open file: nonexistent_include_dir
|
||||
include_dir/02.rem(1): Can't open file: include_dir/04cantread.rem
|
||||
../tests/include_test.rem(2): include_dir_no_rems: No files matching *.rem
|
||||
../tests/include_test.rem(3): Can't open file: nonexistent_include_dir
|
||||
include_dir/02.rem(1): Can't open file: include_dir/04cantread.rem
|
||||
../tests/include_test.rem(2): include_dir_no_rems: No files matching *.rem
|
||||
../tests/include_test.rem(3): Can't open file: nonexistent_include_dir
|
||||
include_dir/02.rem(1): Can't open file: include_dir/04cantread.rem
|
||||
../tests/include_test.rem(2): include_dir_no_rems: No files matching *.rem
|
||||
../tests/include_test.rem(3): Can't open file: nonexistent_include_dir
|
||||
include_dir/02.rem(1): Can't open file: include_dir/04cantread.rem
|
||||
../tests/include_test.rem(2): include_dir_no_rems: No files matching *.rem
|
||||
../tests/include_test.rem(3): Can't open file: nonexistent_include_dir
|
||||
# rem2ps begin
|
||||
|
||||
Reference in New Issue
Block a user