Skip to content

Commit 0304df7

Browse files
raxbgJakeQZ
authored andcommitted
[TASK] Add tests for arithmetic in functions
1 parent cd29137 commit 0304df7

2 files changed

Lines changed: 25 additions & 0 deletions

File tree

tests/ParserTest.php

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1191,6 +1191,19 @@ public function lonelyImport(): void
11911191
self::assertSame($expected, $document->render());
11921192
}
11931193

1194+
/**
1195+
* @test
1196+
*/
1197+
public function functionArithmeticInFile()
1198+
{
1199+
$oDoc = self::parsedStructureForFile('function-arithmetic', Settings::create()->withMultibyteSupport(true));
1200+
$sExpected = 'div {height: max(300,vh+10);}
1201+
div {height: max(300,vh-10);}
1202+
div {height: max(300,vh*10);}
1203+
div {height: max(300,vh/10);}';
1204+
self::assertSame($sExpected, $oDoc->render());
1205+
}
1206+
11941207
public function escapedSpecialCaseTokens(): void
11951208
{
11961209
$document = self::parsedStructureForFile('escaped-tokens');
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
div {
2+
height: max(300, vh + 10);
3+
}
4+
div {
5+
height: max(300, vh - 10);
6+
}
7+
div {
8+
height: max(300, vh * 10);
9+
}
10+
div {
11+
height: max(300, vh / 10);
12+
}

0 commit comments

Comments
 (0)