-
Notifications
You must be signed in to change notification settings - Fork 88
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add initial tests for
set-nth
and maps
- Loading branch information
Showing
11 changed files
with
146 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,9 @@ | ||
foo { | ||
set: red 50px, number 20px; | ||
set-type: list; | ||
before: (key: value, number: 20px); | ||
after: (red 50px, null), number 20px; | ||
length: 2; | ||
key: red 50px; | ||
key-type: list; | ||
value1-type: null; } |
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,19 @@ | ||
$map : ( | ||
key : value, | ||
number : 20px | ||
); | ||
|
||
$index: 1; | ||
$val: red 50px, null; | ||
|
||
foo { | ||
set: set-nth($map, $index, $val); | ||
set-type: type-of(set-nth($map, $index, $val)); | ||
before: inspect($map); | ||
$map: set-nth($map, $index, $val); | ||
after: inspect($map); | ||
length: length(nth($map, $index)); | ||
key: inspect(nth(nth($map, $index), 1)); | ||
key-type: type-of(nth(nth($map, $index), 1)); | ||
value1-type: type-of(nth(nth($map, $index), 2)); | ||
} |
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,9 @@ | ||
foo { | ||
set: red 50px, , foobar, number 20px; | ||
set-type: list; | ||
before: (key: value, number: 20px); | ||
after: (red 50px, null null, foobar), number 20px; | ||
length: 3; | ||
key: red 50px; | ||
key-type: list; | ||
value1-type: list; } |
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,19 @@ | ||
$map : ( | ||
key : value, | ||
number : 20px | ||
); | ||
|
||
$index: 1; | ||
$val: red 50px, null null, foobar; | ||
|
||
foo { | ||
set: set-nth($map, $index, $val); | ||
set-type: type-of(set-nth($map, $index, $val)); | ||
before: inspect($map); | ||
$map: set-nth($map, $index, $val); | ||
after: inspect($map); | ||
length: length(nth($map, $index)); | ||
key: inspect(nth(nth($map, $index), 1)); | ||
key-type: type-of(nth(nth($map, $index), 1)); | ||
value1-type: type-of(nth(nth($map, $index), 2)); | ||
} |
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,8 @@ | ||
foo { | ||
set: red, number 20px; | ||
set-type: list; | ||
before: (key: value, number: 20px); | ||
after: red, number 20px; | ||
length: 1; | ||
key: red; | ||
key-type: 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,18 @@ | ||
$map : ( | ||
key : value, | ||
number : 20px | ||
); | ||
|
||
$index: 1; | ||
$val: red; | ||
|
||
foo { | ||
set: set-nth($map, $index, $val); | ||
set-type: type-of(set-nth($map, $index, $val)); | ||
before: inspect($map); | ||
$map: set-nth($map, $index, $val); | ||
after: inspect($map); | ||
length: length(nth($map, $index)); | ||
key: inspect(nth(nth($map, $index), 1)); | ||
key-type: type-of(nth(nth($map, $index), 1)); | ||
} |
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,4 @@ | ||
--- | ||
:start_version: '3.4' | ||
:todo: | ||
- libsass |
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 @@ | ||
foo { | ||
set: red 50px, number 20px; | ||
set-type: list; | ||
before: (key: value, number: 20px); | ||
after: red 50px, number 20px; | ||
length: 2; | ||
key: red; | ||
key: red; | ||
key-type: color; | ||
value-type: number; } |
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,20 @@ | ||
$map : ( | ||
key : value, | ||
number : 20px | ||
); | ||
|
||
$index: 1; | ||
$val: red 50px; | ||
|
||
foo { | ||
set: set-nth($map, $index, $val); | ||
set-type: type-of(set-nth($map, $index, $val)); | ||
before: inspect($map); | ||
$map: set-nth($map, $index, $val); | ||
after: inspect($map); | ||
length: length(nth($map, $index)); | ||
key: inspect(nth(nth($map, $index), 1)); | ||
key: inspect(nth(nth($map, $index), 1)); | ||
key-type: type-of(nth(nth($map, $index), 1)); | ||
value-type: type-of(nth(nth($map, $index), 2)); | ||
} |
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 @@ | ||
foo { | ||
set: red 50px, number 20px; | ||
set-type: list; | ||
before: (key: value, number: 20px); | ||
after: red 50px null, number 20px; | ||
length: 3; | ||
key: red; | ||
key-type: color; | ||
value1-type: number; | ||
value2-type: null; } |
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,20 @@ | ||
$map : ( | ||
key : value, | ||
number : 20px | ||
); | ||
|
||
$index: 1; | ||
$val: red 50px null; | ||
|
||
foo { | ||
set: set-nth($map, $index, $val); | ||
set-type: type-of(set-nth($map, $index, $val)); | ||
before: inspect($map); | ||
$map: set-nth($map, $index, $val); | ||
after: inspect($map); | ||
length: length(nth($map, $index)); | ||
key: inspect(nth(nth($map, $index), 1)); | ||
key-type: type-of(nth(nth($map, $index), 1)); | ||
value1-type: type-of(nth(nth($map, $index), 2)); | ||
value2-type: type-of(nth(nth($map, $index), 3)); | ||
} |