# HG changeset patch # User Matt Mackall # Date 2010-09-26 18:43:21 # Node ID 17ebf11bff81f3b9f64361b5739a49519b56d0a7 # Parent 0fcdae13493b5f78593fd551ccccb5e190eb6f1d tests: unify test-inotify-debuginotify diff --git a/tests/test-inotify-debuginotify.out b/tests/test-inotify-debuginotify.out deleted file mode 100644 --- a/tests/test-inotify-debuginotify.out +++ /dev/null @@ -1,14 +0,0 @@ -% inserve -% empty -directories being watched: - / - .hg/ -% only a -directories being watched: - / - .hg/ - a/ -% empty again -directories being watched: - / - .hg/ diff --git a/tests/test-inotify-debuginotify b/tests/test-inotify-debuginotify.t old mode 100755 new mode 100644 rename from tests/test-inotify-debuginotify rename to tests/test-inotify-debuginotify.t --- a/tests/test-inotify-debuginotify +++ b/tests/test-inotify-debuginotify.t @@ -1,32 +1,41 @@ -#!/bin/sh -"$TESTDIR/hghave" inotify || exit 80 + $ "$TESTDIR/hghave" inotify || exit 80 + $ hg init + $ echo "[extensions]" >> $HGRCPATH + $ echo "inotify=" >> $HGRCPATH -hg init +inserve -echo "[extensions]" >> $HGRCPATH -echo "inotify=" >> $HGRCPATH + $ hg inserve -d --pid-file=hg.pid + $ cat hg.pid >> "$DAEMON_PIDS" -echo % inserve -hg inserve -d --pid-file=hg.pid -cat hg.pid >> "$DAEMON_PIDS" +let the daemon finish its stuff -# let the daemon finish its stuff -sleep 1 + $ sleep 1 + +empty -echo % empty -hg debuginotify + $ hg debuginotify + directories being watched: + / + .hg/ + $ mkdir a + $ sleep 1 -mkdir a -sleep 1 +only 'a -echo % only 'a' -hg debuginotify + $ hg debuginotify + directories being watched: + / + .hg/ + a/ + $ rmdir a + $ sleep 1 -rmdir a -sleep 1 +empty again -echo % empty again -hg debuginotify - -kill `cat hg.pid` + $ hg debuginotify + directories being watched: + / + .hg/ + $ kill `cat hg.pid`