aboutsummaryrefslogtreecommitdiff
path: root/tests/testsuite.at
blob: 220ad9c98bc6a9ee14e2b876095f6e1ed7d0bf9e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
# This file is part of GNU direvent testsuite. -*- Autotest -*-
# Copyright (C) 2013-2022 Sergey Poznyakoff
#
# GNU direvent is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3, or (at your option)
# any later version.
#
# GNU direvent is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with GNU direvent.  If not, see <http://www.gnu.org/licenses/>.

m4_version_prereq([2.52g])

m4_define([AT_SKIP_TEST],[exit 77])

dnl m4_direvent_test([MOD],
dnl                  [CONFIG],[SELFTEST],[PROLOGUE],[EPILOGUE],[CODE],[STDOUT],
dnl                  [PRIO],[STDERR])
m4_define([m4_direvent_test],[
cwd=`pwd -P`
AT_CHECK$1([
$4
cat > test.conf <<EOT
[$2]
EOT
cat > selftest.sh <<EOT
#!/bin/sh
[$3]
sleep 10
exit 21
EOT
chmod +x selftest.sh
direvent -ldebug -f --self-test $cwd/selftest.sh test.conf dnl
 2>direvent.log || exit $?
m4_if([$8],[],[],[sed -n m4_foreach([i], [$8], [-e '/\@<:@i\@:>@/p']) direvent.log >&2])
$5
],
[$6],
[$7],
[$9])])

m4_define([AT_DIREVENT_TEST],[m4_direvent_test([],$@)])
m4_define([AT_DIREVENT_TEST_UNQUOTED],[m4_direvent_test([_UNQUOTED], $@)])

AT_INIT
AT_TESTED([direvent])

m4_include([create.at])
m4_include([createrec.at])
m4_include([createrec2.at])
m4_include([createrec3.at])
m4_include([delete.at])
m4_include([write.at])
m4_include([attrib.at])
m4_include([cmdexp.at])
m4_include([samepath.at])
m4_include([shell.at])
m4_include([change.at])

AT_BANNER([Environment modifications])
m4_include([env00.at])
m4_include([env01.at])
m4_include([env02.at])
m4_include([env03.at])
m4_include([env04.at])
m4_include([env05.at])
m4_include([env06.at])

AT_BANNER([Environment modifications (deprecated)])
m4_include([envleg00.at])
m4_include([envleg01.at])
m4_include([envleg02.at])
m4_include([envleg03.at])

AT_BANNER([Filename selection])
m4_include([glob01.at])
m4_include([glob02.at])
m4_include([re01.at])
m4_include([re02.at])
m4_include([re03.at])
m4_include([re04.at])
m4_include([re05.at])

AT_BANNER([Special watchpoints])
m4_include([file.at])
m4_include([sent.at])

Return to:

Send suggestions and report system problems to the System administrator.