Skip to content

Commit

Permalink
Add simple tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Amphiluke committed Jun 29, 2019
1 parent c815671 commit 22bf630
Show file tree
Hide file tree
Showing 19 changed files with 1,270 additions and 0 deletions.
1 change: 1 addition & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
.idea
.eslint*
rollup.config.js
test
*.tgz
1 change: 1 addition & 0 deletions test/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.css
1 change: 1 addition & 0 deletions test/less/child-01.less
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/* child-01 */
1 change: 1 addition & 0 deletions test/less/child-02-1.less
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/* child-02-1 */
1 change: 1 addition & 0 deletions test/less/child-02-2.less
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/* child-02-2 */
1 change: 1 addition & 0 deletions test/less/child-02.less
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/* child-02 */
1 change: 1 addition & 0 deletions test/less/child-03.less
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/* child-03 */
1 change: 1 addition & 0 deletions test/less/child-04-1.less
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/* child-04-1 */
1 change: 1 addition & 0 deletions test/less/child-04.less
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/* child-04 */
1 change: 1 addition & 0 deletions test/less/child-05-1.less
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/* child-05-1 */
1 change: 1 addition & 0 deletions test/less/child-05.less
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/* child-05 */
19 changes: 19 additions & 0 deletions test/less/root-01.less
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
body {
background:#000;
}

// Test skipping commented out imports
// @import "root-02";
//@import "root-03";

/*
a {
color:#0a0;
}
@import "root-04";
some text
*/

/*@import "root-05";*/

@import "child-01";
7 changes: 7 additions & 0 deletions test/less/root-02.less
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
// Test extraction of imports placed in one line
@import "child-02"; @import "child-02-1";@import "child-02-2";

body {
background:#000;
}

6 changes: 6 additions & 0 deletions test/less/root-03.less
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
body {
background:#000;
}

// Test extraction of imports with extension specified
@import "./child-03.less";
20 changes: 20 additions & 0 deletions test/less/root-04.less
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
// Test some “quirky” cases

// With line breaks
@import
"child-04";

@import

"child-04-1"

;

@import (reference) "child-04";

// Variable name includes substring “import”
@import01: "root-01";

body {
background:#000;
}
8 changes: 8 additions & 0 deletions test/less/root-05.less
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
// Test imports with options

@import (reference) "child-05";
@import (less) "child-05-1.less";

body {
background:#000;
}
Loading

0 comments on commit 22bf630

Please sign in to comment.