-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
97d43b9
commit d6980e0
Showing
10 changed files
with
110 additions
and
38 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,41 @@ | ||
var fs = require('fs'); | ||
var path = require('path'); | ||
var testsDir = path.dirname(require.main.filename); | ||
var incorrectFiles = []; | ||
|
||
var error = false; | ||
|
||
var filesToWatch = [ | ||
'css.css', | ||
'js.js', | ||
'less.css', | ||
'sass.css' | ||
]; | ||
|
||
console.log('Testing...'); | ||
|
||
for (var i = 0, l = filesToWatch.length; i < l; i++) { | ||
var file = filesToWatch[i]; | ||
var outputContent = fs.readFileSync(testsDir+'/output_tests/'+file).toString().trim(); | ||
var expectedContent = fs.readFileSync(testsDir+'/output_expected/'+file).toString().trim(); | ||
|
||
if (outputContent !== expectedContent) { | ||
error = true; | ||
incorrectFiles.push({ | ||
file: file, | ||
expected: expectedContent, | ||
test_result: outputContent | ||
}); | ||
process.stdout.write('\x1b[37m\x1b[41mE\x1b[0m'); | ||
} else { | ||
process.stdout.write('\x1b[32m.\x1b[0m'); | ||
} | ||
} | ||
|
||
if (error) { | ||
console.log("\nErrors:"); | ||
console.log(JSON.stringify(incorrectFiles, null, 4)); | ||
process.exit(1); | ||
} else { | ||
console.log("\nOk!"); | ||
} |
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 |
---|---|---|
|
@@ -3,5 +3,5 @@ Testing file | |
*/ | ||
body | ||
{ | ||
background: #fff; | ||
background: #ffffff; | ||
} |
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 |
---|---|---|
@@ -1,8 +1,10 @@ | ||
.border { | ||
border: solid 1px black; | ||
@color: #333333; | ||
|
||
.color() { | ||
color: @color; | ||
} | ||
|
||
.element { | ||
display: none; | ||
.border; | ||
body { | ||
border-radius: 3px; | ||
.color(); | ||
} |
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,10 @@ | ||
$color: #333333; | ||
|
||
@mixin color { | ||
color: $color; | ||
} | ||
|
||
body { | ||
border-radius: 3px; | ||
@include color(); | ||
} |
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 @@ | ||
body{background:#fff} |
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 @@ | ||
!function(e){e("#element").hide()}(jQuery); |
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 @@ | ||
body{border-radius:3px;color:#333} |
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 @@ | ||
body{border-radius:3px;color:#333} |
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
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