Skip to content

Commit 53d4da3

Browse files
committed
add source maps tests
1 parent ba4a756 commit 53d4da3

File tree

4 files changed

+32
-2
lines changed

4 files changed

+32
-2
lines changed

Makefile

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,18 @@ all: clean lint test
33
lint:
44
./node_modules/.bin/jshint *.js
55

6-
TESTS = opts stdout stdin config config-all js-config js-config-all invalid
6+
TESTS = opts source-maps source-maps-file stdout stdin config config-all js-config js-config-all invalid
7+
8+
79
DIFF = diff -q
810

9-
test: test/build test-help test-version $(patsubst %,test/build/%.css,$(TESTS)) test-multi test-replace test-local-plugins
11+
test: test/build \
12+
test-help \
13+
test-version \
14+
$(patsubst %,test/build/%.css,$(TESTS)) \
15+
test-multi \
16+
test-replace \
17+
test-local-plugins
1018

1119
test-help:
1220
./bin/postcss --help
@@ -41,6 +49,15 @@ test/build/opts.css: test/in.css
4149
./bin/postcss -u postcss-url --postcss-url.url=rebase -o $@ $<
4250
$(DIFF) $@ $(subst build,ref,$@)
4351

52+
test/build/source-maps.css: test/in.css
53+
./bin/postcss -u postcss-url --postcss-url.url=rebase --map -o $@ $<
54+
$(DIFF) $@ $(subst build,ref,$@)
55+
56+
test/build/source-maps-file.css: test/in.css
57+
./bin/postcss -u postcss-url --postcss-url.url=rebase --map file -o $@ $<
58+
$(DIFF) $@ $(subst build,ref,$@)
59+
$(DIFF) ${@}.map $(subst build,ref,${@}.map)
60+
4461
test/build/stdout.css: test/in.css
4562
./bin/postcss --use ./test/dummy-plugin $< > $@
4663
$(DIFF) $@ $(subst build,ref,$@)

test/ref/source-maps-file.css

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

test/ref/source-maps-file.css.map

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

test/ref/source-maps.css

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)