aboutsummaryrefslogtreecommitdiff
path: root/tests/conv.at
diff options
context:
space:
mode:
Diffstat (limited to 'tests/conv.at')
-rw-r--r--tests/conv.at63
1 files changed, 63 insertions, 0 deletions
diff --git a/tests/conv.at b/tests/conv.at
new file mode 100644
index 0000000..d46f7f6
--- /dev/null
+++ b/tests/conv.at
@@ -0,0 +1,63 @@
1# This file is part of Direvent testsuite. -*- Autotest -*-
2# Copyright (C) 2013-2016 Sergey Poznyakoff
3#
4# Direvent is free software; you can redistribute it and/or modify
5# it under the terms of the GNU General Public License as published by
6# the Free Software Foundation; either version 3, or (at your option)
7# any later version.
8#
9# Direvent is distributed in the hope that it will be useful,
10# but WITHOUT ANY WARRANTY; without even the implied warranty of
11# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12# GNU General Public License for more details.
13#
14# You should have received a copy of the GNU General Public License
15# along with Direvent. If not, see <http://www.gnu.org/licenses/>.
16
17AT_SETUP([File watcher])
18AT_KEYWORDS([special conv convert file])
19
20AT_DIREVENT_TEST_UNQUOTED([
21debug 10;
22syslog {
23 facility ${TESTSUITE_FACILITY:-local0};
24 tag direvent-test:create;
25}
26watcher {
27 path $cwd/file;
28 event (create,write,delete);
29 option (stdout,stderr);
30 command "$TESTDIR/envdump -s -i DIREVENT_FILE=:DIREVENT_GENEV_ -f $outfile -k\$self_test_pid";
31}
32],
33[echo "foo" > file
34],
35[outfile=$cwd/dump
36echo "file" > file
37],
38[sed '/^argv\[[[0-9]]\]=-k/d' $outfile
39],
40[0],
41[# Dump of execution environment
42cwd is $cwd
43# Arguments
44argv[[0]]=$TESTDIR/envdump
45argv[[1]]=-s
46argv[[2]]=-i
47argv[[3]]=DIREVENT_FILE=:DIREVENT_GENEV_
48argv[[4]]=-f
49argv[[5]]=$cwd/dump
50# Environment
51DIREVENT_FILE=file
52DIREVENT_GENEV_CODE=2
53DIREVENT_GENEV_NAME=write
54# End
55],
56[direvent: [[NOTICE]] file watcher $cwd/file converted to directory watcher $cwd
57])
58
59AT_CLEANUP
60
61
62
63

Return to:

Send suggestions and report system problems to the System administrator.