# This file is part of Direvent testsuite. -*- Autotest -*- # Copyright (C) 2014 Sergey Poznyakoff # # 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. # # 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 Direvent. If not, see . AT_SETUP([Regexp negation]) AT_KEYWORDS([create fname regexp re re05 neg]) AT_DIREVENT_TEST([ debug 10; syslog { facility ${TESTSUITE_FACILITY:-local0}; tag direvent-test:create; } watcher { path $cwd/dir; event create; file "!/\.[0-9]+$/"; command "$TESTDIR/envdump -s -i DIREVENT_FILE=:DIREVENT_GENEV_ -f $outfile -a -k\$self_test_pid"; option (stdout,stderr); } ], [> dir/file > dir/file.1234 ], [outfile=$cwd/dump mkdir dir ], [sed "s^$cwd^(CWD)^;s^$TESTDIR^(TESTDIR)^;/^argv\[[[0-9]]\]=-k/d;/DIREVENT_SELF_TEST_PID/d" $outfile ], [0], [# Dump of execution environment cwd is (CWD)/dir # Arguments argv[[0]]=(TESTDIR)/envdump argv[[1]]=-s argv[[2]]=-i argv[[3]]=DIREVENT_FILE=:DIREVENT_GENEV_ argv[[4]]=-f argv[[5]]=(CWD)/dump argv[[6]]=-a # Environment DIREVENT_FILE=file DIREVENT_GENEV_CODE=1 DIREVENT_GENEV_NAME=create # End ]) AT_CLEANUP