Skip to content

Commit f734920

Browse files
committed
Add tests for arithmetic in functions
1 parent 093c527 commit f734920

File tree

2 files changed

+25
-0
lines changed

2 files changed

+25
-0
lines changed

tests/ParserTest.php

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1225,6 +1225,19 @@ public function lonelyImport()
12251225
self::assertSame($sExpected, $oDoc->render());
12261226
}
12271227

1228+
/**
1229+
* @test
1230+
*/
1231+
public function functionArithmeticInFile()
1232+
{
1233+
$oDoc = self::parsedStructureForFile('function-arithmetic', Settings::create()->withMultibyteSupport(true));
1234+
$sExpected = 'div {height: max(300,vh+10);}
1235+
div {height: max(300,vh-10);}
1236+
div {height: max(300,vh*10);}
1237+
div {height: max(300,vh/10);}';
1238+
self::assertSame($sExpected, $oDoc->render());
1239+
}
1240+
12281241
public function escapedSpecialCaseTokens()
12291242
{
12301243
$oDoc = $this->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)