diff --git a/tests/test-inotify-issue1542.out b/tests/test-inotify-issue1542.out
deleted file mode 100644
--- a/tests/test-inotify-issue1542.out
+++ /dev/null
@@ -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 --git a/tests/test-inotify-issue1542 b/tests/test-inotify-issue1542.t
old mode 100755
new mode 100644
rename from tests/test-inotify-issue1542
rename to tests/test-inotify-issue1542.t
--- a/tests/test-inotify-issue1542
+++ b/tests/test-inotify-issue1542.t
@@ -1,32 +1,36 @@
-#!/bin/sh
-
-"$TESTDIR/hghave" inotify || exit 80
-
-hg init
 
-touch a
-mkdir dir
-touch dir/b
-touch dir/c
+  $ "$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 "[extensions]" >> $HGRCPATH
-echo "inotify=" >> $HGRCPATH
-
-hg add dir/c
+inserve
 
-echo % inserve
-hg inserve -d --pid-file=hg.pid 2>&1
-cat hg.pid >> "$DAEMON_PIDS"
+  $ hg inserve -d --pid-file=hg.pid 2>&1
+  $ cat hg.pid >> "$DAEMON_PIDS"
+  $ hg st
+  A dir/c
+  ? a
+  ? dir/b
+  ? hg.pid
 
-hg st
+moving dir out
+
+  $ mv dir ../tmp-test-inotify-issue1542
 
-echo % moving dir out
-mv dir ../tmp-test-inotify-issue1542
+status
 
-echo % status
-hg st
+  $ hg st
+  ! dir/c
+  ? a
+  ? hg.pid
+  $ sleep 1
 
-sleep 1
-echo "Are we able to kill the service? if not, the service died on some error"
-kill `cat hg.pid`
+Are we able to kill the service? if not, the service died on some error
 
+  $ kill `cat hg.pid`