Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a test script and a functional test for the safari-borking bug re…
…ported by rharmes.
- Loading branch information
isaacs
committed
Jul 23, 2009
1 parent
a3fbd7c
commit 04665d5
Showing
4 changed files
with
40 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
To add a test: | ||
|
||
1. Create a "blah.css" or "blah.js" file. | ||
2. Create a "blah.css.min" or "blah.js.min" file, containing the expected minified output. | ||
|
||
That's all! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
@media screen and (-webkit-min-device-pixel-ratio:0) { | ||
some-css : here | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
@media screen and (-webkit-min-device-pixel-ratio:0){some-css:here;} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#!/usr/bin/env bash | ||
|
||
cd $(dirname $0) | ||
|
||
ls *.{css,js} | egrep -v '\.min$' | while read testfile; do | ||
|
||
expected="$( | ||
cat $( ls $testfile* | egrep '\.min$' ) | ||
)" | ||
actual="$( | ||
java -jar ../build/yuicompressor*.jar $testfile | ||
)" | ||
|
||
if [ "$expected" == "$actual" ]; then | ||
echo "Passed: $testfile" > /dev/stderr | ||
else | ||
( | ||
echo "Test failed: $testfile" | ||
echo "" | ||
echo "Expected:" | ||
echo "$expected" | ||
echo "" | ||
echo "Actual:" | ||
echo "$actual" | ||
) > /dev/stderr | ||
exit 1 | ||
fi | ||
done | ||
|
||
exit 0 |