1
1
set -e
2
2
3
- echo $OSTYPE
4
-
5
3
# Zero out result file
6
4
echo ' ' > ./test/cli/basic.result.css;
7
5
8
6
# Test with long flag
9
7
postcss-base-plugin ./test/cli/basic.css --output ./test/cli/basic.result.css
10
8
11
9
# Check result
12
- if [[ " $OSTYPE " == " msys" ]]; then
13
- # CRLF on Windows makes it hard to test with base64 encoded sourcemaps
14
- echo ' did not compare actual output assuming exit 0 means everything is ok'
15
- else
16
- git --no-pager diff --no-index --word-diff ./test/cli/basic.expect.css ./test/cli/basic.result.css
17
- fi
10
+ git --no-pager diff --no-index --word-diff ./test/cli/basic.expect.css ./test/cli/basic.result.css
18
11
19
12
# Reset result file
20
13
cat ./test/cli/basic.css > ./test/cli/basic.replace.css;
@@ -23,12 +16,7 @@ cat ./test/cli/basic.css > ./test/cli/basic.replace.css;
23
16
postcss-base-plugin ./test/cli/basic.replace.css -r
24
17
25
18
# Check result
26
- if [[ " $OSTYPE " == " msys" ]]; then
27
- # CRLF on Windows makes it hard to test with base64 encoded sourcemaps
28
- echo ' did not compare actual output assuming exit 0 means everything is ok'
29
- else
30
- git --no-pager diff --no-index --word-diff ./test/cli/basic.replace.css ./test/cli/basic.replace.expect.css
31
- fi
19
+ git --no-pager diff --no-index --word-diff ./test/cli/basic.replace.css ./test/cli/basic.replace.expect.css
32
20
33
21
# Zero out result file
34
22
echo ' ' > ./test/cli/basic.color.result.css;
@@ -37,12 +25,7 @@ echo '' > ./test/cli/basic.color.result.css;
37
25
postcss-base-plugin ./test/cli/basic.css -o ./test/cli/basic.color.result.css -p ' { "color": "purple" }'
38
26
39
27
# Check result
40
- if [[ " $OSTYPE " == " msys" ]]; then
41
- # CRLF on Windows makes it hard to test with base64 encoded sourcemaps
42
- echo ' did not compare actual output assuming exit 0 means everything is ok'
43
- else
44
- git --no-pager diff --no-index --word-diff ./test/cli/basic.color.expect.css ./test/cli/basic.color.result.css
45
- fi
28
+ git --no-pager diff --no-index --word-diff ./test/cli/basic.color.expect.css ./test/cli/basic.color.result.css
46
29
47
30
# Zero out result file
48
31
echo ' ' > ./test/cli/basic.stdin.result.css;
@@ -51,12 +34,7 @@ echo '' > ./test/cli/basic.stdin.result.css;
51
34
cat ./test/cli/basic.css | postcss-base-plugin > ./test/cli/basic.stdin.result.css
52
35
53
36
# Check result
54
- if [[ " $OSTYPE " == " msys" ]]; then
55
- # CRLF on Windows makes it hard to test with base64 encoded sourcemaps
56
- echo ' did not compare actual output assuming exit 0 means everything is ok'
57
- else
58
- git --no-pager diff --no-index --word-diff ./test/cli/basic.stdin.expect.css ./test/cli/basic.stdin.result.css
59
- fi
37
+ git --no-pager diff --no-index --word-diff ./test/cli/basic.stdin.expect.css ./test/cli/basic.stdin.result.css
60
38
61
39
# Zero out result file
62
40
echo ' ' > ./test/cli/basic.no-map.result.css;
@@ -76,12 +54,7 @@ cat ./test/cli/basic.css | postcss-base-plugin --map -o ./test/cli/basic.extern
76
54
77
55
# Check result
78
56
git --no-pager diff --no-index --word-diff ./test/cli/basic.external-map.expect.css ./test/cli/basic.external-map.result.css
79
- if [[ " $OSTYPE " == " msys" ]]; then
80
- # CRLF on Windows makes it hard to test with base64 encoded sourcemaps
81
- echo ' did not compare actual output assuming exit 0 means everything is ok'
82
- else
83
- git --no-pager diff --no-index --word-diff ./test/cli/basic.external-map.expect.css.map ./test/cli/basic.external-map.result.css.map
84
- fi
57
+ git --no-pager diff --no-index --word-diff ./test/cli/basic.external-map.expect.css.map ./test/cli/basic.external-map.result.css.map
85
58
86
59
# Zero out result file
87
60
echo ' ' > ./test/cli/out/a.css
@@ -95,14 +68,9 @@ postcss-base-plugin ./test/cli/src/a.css ./test/cli/src/b.css -m -d ./test/cli/o
95
68
# Check result
96
69
git --no-pager diff --no-index --word-diff ./test/cli/out/a.css ./test/cli/out/a.expect.css
97
70
git --no-pager diff --no-index --word-diff ./test/cli/out/b.css ./test/cli/out/b.expect.css
71
+ git --no-pager diff --no-index --word-diff ./test/cli/out/a.css.map ./test/cli/out/a.expect.css.map
72
+ git --no-pager diff --no-index --word-diff ./test/cli/out/b.css.map ./test/cli/out/b.expect.css.map
98
73
99
- if [[ " $OSTYPE " == " msys" ]]; then
100
- # CRLF on Windows makes it hard to test with base64 encoded sourcemaps
101
- echo ' did not compare actual output assuming exit 0 means everything is ok'
102
- else
103
- git --no-pager diff --no-index --word-diff ./test/cli/out/a.css.map ./test/cli/out/a.expect.css.map
104
- git --no-pager diff --no-index --word-diff ./test/cli/out/b.css.map ./test/cli/out/b.expect.css.map
105
- fi
106
74
107
75
# Zero out result file
108
76
echo ' ' > ./test/cli/out/concatenated.css
0 commit comments