Skip to content

Commit 9aaa652

Browse files
RyanZimwatilde
authored andcommitted
Add test for --poll
1 parent 59e6621 commit 9aaa652

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

Makefile

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,17 @@ test-watch: test/import-*.css
4242
kill `cat test/watch.pid` # FIXME: never reached on failure
4343
rm test/watch.pid
4444

45+
test-watch-poll: test/import-*.css
46+
echo '@import "import-foo.css";' > test/import-index.css
47+
./bin/postcss -c test/config-watch.js -w --poll & echo $$! > test/watch.pid
48+
sleep 1
49+
$(DIFF) test/build/watch.css test/ref/watch-1.css
50+
echo '@import "import-bar.css";' >> test/import-index.css
51+
sleep 1
52+
$(DIFF) test/build/watch.css test/ref/watch-2.css
53+
kill `cat test/watch.pid` # FIXME: never reached on failure
54+
rm test/watch.pid
55+
4556
test-local-plugins:
4657
cd test; ../bin/postcss --use a-dummy-plugin --local-plugins -o build/local-plugins in.css
4758

0 commit comments

Comments
 (0)