Skip to content

Commit

Permalink
Added unit testing (cont')
Browse files Browse the repository at this point in the history
  • Loading branch information
Anantachai Saothong (Manta) committed Apr 7, 2017
1 parent 0415abb commit 31c9d13
Show file tree
Hide file tree
Showing 21 changed files with 203 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"insertColons": true,
"insertSemicolons": true,
"insertBraces": true,
"insertNewLineBetweenGroups": 1,
"insertNewLineBetweenSelectors": false,
"insertNewLineBetweenElseIf": false,
"insertSpaceBeforeComments": true,
"insertSpaceAfterComments": true,
"indentChar": "\t",
"newLineChar": "\r\n",
"sortProperties": false,
"alwaysUseImport": false,
"alwaysUseNot": true
}
6 changes: 6 additions & 0 deletions spec/option-insert-new-line-between-else-if-false/input.styl
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
if true
display block
else if false
display inline
else
display none
7 changes: 7 additions & 0 deletions spec/option-insert-new-line-between-else-if-false/output.styl
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
if (true) {
display: block;
} else if (false) {
display: inline;
} else {
display: none;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"insertColons": true,
"insertSemicolons": true,
"insertBraces": true,
"insertNewLineBetweenGroups": 1,
"insertNewLineBetweenSelectors": false,
"insertNewLineBetweenElseIf": true,
"insertSpaceBeforeComments": true,
"insertSpaceAfterComments": true,
"indentChar": "\t",
"newLineChar": "\r\n",
"sortProperties": false,
"alwaysUseImport": false,
"alwaysUseNot": true
}
6 changes: 6 additions & 0 deletions spec/option-insert-new-line-between-else-if-true/input.styl
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
if true
display block
else if false
display inline
else
display none
9 changes: 9 additions & 0 deletions spec/option-insert-new-line-between-else-if-true/output.styl
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
if (true) {
display: block;
}
else if (false) {
display: inline;
}
else {
display: none;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"insertColons": true,
"insertSemicolons": true,
"insertBraces": true,
"insertNewLineBetweenGroups": 1,
"insertNewLineBetweenSelectors": false,
"insertSpaceBeforeComments": true,
"insertSpaceAfterComments": true,
"indentChar": "\t",
"newLineChar": "\r\n",
"sortProperties": false,
"alwaysUseImport": false,
"alwaysUseNot": true
}
4 changes: 4 additions & 0 deletions spec/option-insert-new-line-between-selector-false/input.styl
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
body,.class1,.class2:hover
display none
.class3,input[type=text]
display block
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
body, .class1, .class2:hover {
display: none;

.class3, input[type=text] {
display: block;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"insertColons": true,
"insertSemicolons": true,
"insertBraces": true,
"insertNewLineBetweenGroups": 1,
"insertNewLineBetweenSelectors": false,
"insertSpaceBeforeComments": true,
"insertSpaceAfterComments": false,
"indentChar": "\t",
"newLineChar": "\r\n",
"sortProperties": false,
"alwaysUseImport": false,
"alwaysUseNot": true
}
7 changes: 7 additions & 0 deletions spec/option-insert-space-after-comment-false/input.styl
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
//comment-1
body//comment-2
display none//comment-3

/*comment-4*/
.class1/*comment-5*/
display none/*comment-6*/
9 changes: 9 additions & 0 deletions spec/option-insert-space-after-comment-false/output.styl
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
//comment-1
body { //comment-2
display: none; //comment-3
}

/*comment-4*/
.class1 { /*comment-5*/
display: none; /*comment-6*/
}
14 changes: 14 additions & 0 deletions spec/option-insert-space-after-comment-true/formattingOptions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"insertColons": true,
"insertSemicolons": true,
"insertBraces": true,
"insertNewLineBetweenGroups": 1,
"insertNewLineBetweenSelectors": false,
"insertSpaceBeforeComments": true,
"insertSpaceAfterComments": true,
"indentChar": "\t",
"newLineChar": "\r\n",
"sortProperties": false,
"alwaysUseImport": false,
"alwaysUseNot": true
}
7 changes: 7 additions & 0 deletions spec/option-insert-space-after-comment-true/input.styl
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
//comment-1
body//comment-2
display none//comment-3

/*comment-4*/
.class1/*comment-5*/
display none/*comment-6*/
9 changes: 9 additions & 0 deletions spec/option-insert-space-after-comment-true/output.styl
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
// comment-1
body { // comment-2
display: none; // comment-3
}

/* comment-4 */
.class1 { /* comment-5 */
display: none; /* comment-6 */
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"insertColons": true,
"insertSemicolons": true,
"insertBraces": true,
"insertNewLineBetweenGroups": 1,
"insertNewLineBetweenSelectors": false,
"insertSpaceBeforeComments": false,
"insertSpaceAfterComments": true,
"indentChar": "\t",
"newLineChar": "\r\n",
"sortProperties": false,
"alwaysUseImport": false,
"alwaysUseNot": true
}
7 changes: 7 additions & 0 deletions spec/option-insert-space-before-comment-false/input.styl
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
//comment-1
body//comment-2
display none//comment-3

/*comment-4*/
.class1/*comment-5*/
display none/*comment-6*/
9 changes: 9 additions & 0 deletions spec/option-insert-space-before-comment-false/output.styl
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
// comment-1
body {// comment-2
display: none;// comment-3
}

/* comment-4 */
.class1 {/* comment-5 */
display: none;/* comment-6 */
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"insertColons": true,
"insertSemicolons": true,
"insertBraces": true,
"insertNewLineBetweenGroups": 1,
"insertNewLineBetweenSelectors": false,
"insertSpaceBeforeComments": true,
"insertSpaceAfterComments": true,
"indentChar": "\t",
"newLineChar": "\r\n",
"sortProperties": false,
"alwaysUseImport": false,
"alwaysUseNot": true
}
7 changes: 7 additions & 0 deletions spec/option-insert-space-before-comment-true/input.styl
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
//comment-1
body//comment-2
display none//comment-3

/*comment-4*/
.class1/*comment-5*/
display none/*comment-6*/
9 changes: 9 additions & 0 deletions spec/option-insert-space-before-comment-true/output.styl
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
// comment-1
body { // comment-2
display: none; // comment-3
}

/* comment-4 */
.class1 { /* comment-5 */
display: none; /* comment-6 */
}

0 comments on commit 31c9d13

Please sign in to comment.