# HG changeset patch # User Matt Mackall # Date 1285526601 18000 # Node ID 92b2c876a79db3b8c20d73abed4a27b1c242ef97 # Parent 9965b90c7ed7b1dc785bf499ce9780da86239da7 tests: unify test-inotify-issue1542 diff -r 9965b90c7ed7 -r 92b2c876a79d tests/test-inotify-issue1542 --- a/tests/test-inotify-issue1542 Sun Sep 26 13:43:21 2010 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,32 +0,0 @@ -#!/bin/sh - -"$TESTDIR/hghave" inotify || exit 80 - -hg init - -touch a -mkdir dir -touch dir/b -touch dir/c - -echo "[extensions]" >> $HGRCPATH -echo "inotify=" >> $HGRCPATH - -hg add dir/c - -echo % inserve -hg inserve -d --pid-file=hg.pid 2>&1 -cat hg.pid >> "$DAEMON_PIDS" - -hg st - -echo % moving dir out -mv dir ../tmp-test-inotify-issue1542 - -echo % status -hg st - -sleep 1 -echo "Are we able to kill the service? if not, the service died on some error" -kill `cat hg.pid` - diff -r 9965b90c7ed7 -r 92b2c876a79d tests/test-inotify-issue1542.out --- a/tests/test-inotify-issue1542.out Sun Sep 26 13:43:21 2010 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,11 +0,0 @@ -% inserve -A dir/c -? a -? dir/b -? hg.pid -% moving dir out -% status -! dir/c -? a -? hg.pid -Are we able to kill the service? if not, the service died on some error diff -r 9965b90c7ed7 -r 92b2c876a79d tests/test-inotify-issue1542.t --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/test-inotify-issue1542.t Sun Sep 26 13:43:21 2010 -0500 @@ -0,0 +1,36 @@ + + $ "$TESTDIR/hghave" inotify || exit 80 + $ hg init + $ touch a + $ mkdir dir + $ touch dir/b + $ touch dir/c + $ echo "[extensions]" >> $HGRCPATH + $ echo "inotify=" >> $HGRCPATH + $ hg add dir/c + +inserve + + $ hg inserve -d --pid-file=hg.pid 2>&1 + $ cat hg.pid >> "$DAEMON_PIDS" + $ hg st + A dir/c + ? a + ? dir/b + ? hg.pid + +moving dir out + + $ mv dir ../tmp-test-inotify-issue1542 + +status + + $ hg st + ! dir/c + ? a + ? hg.pid + $ sleep 1 + +Are we able to kill the service? if not, the service died on some error + + $ kill `cat hg.pid`