Skip to content

Commit

Permalink
test: add more case
Browse files Browse the repository at this point in the history
  • Loading branch information
yisibl committed Sep 23, 2022
1 parent 36c8bbd commit 3fff94c
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5993,10 +5993,16 @@ mod tests {
minify_test(".foo { column-count: auto; }", ".foo{column-count:auto}");
minify_test(".foo { column-count: 1; }", ".foo{column-count:1}");

// Test minimum and maximum values: Chrome/Safari is 65535, Firefox is 1000.
minify_test(".foo { column-count: 123456789000; }", ".foo{column-count:2147483647}");
minify_test(".foo { column-count: -123456789000; }", ".foo{column-count:-2147483648}");
// minify_test("@supports ( column-width: 0px ) { .bar { column-width: 0px; } }", "@supports (column-width: 0px){.bar{column-width:0}}");

// TODO: Supprot calc
// minify_test(".foo { column-count: min(10, 3); }", ".foo{column-count:3}");
// minify_test(".foo { column-count: calc(10 / 5); }", ".foo{column-count:2}");
// minify_test(".foo { column-count: calc(2 * 3); }", ".foo{column-count:6}");
// minify_test(".foo { column-count: calc(infinity * 1); }", ".foo{column-count:2147483647}");

// Invalid values
// minify_test(".foo { column-count: 1.4; }", ".foo{column-count:1.4}");
Expand Down Expand Up @@ -21949,6 +21955,9 @@ mod tests {
minify_test(".foo { z-index: 999999 }", ".foo{z-index:999999}");
minify_test(".foo { z-index: 9999999 }", ".foo{z-index:9999999}");
minify_test(".foo { z-index: -9999999 }", ".foo{z-index:-9999999}");
minify_test(".foo { z-index: calc(10 * 2) }", ".foo{z-index:calc(10*2)}");
minify_test(".foo { z-index: 2147483647 }", ".foo{z-index:2147483647}");
minify_test(".foo { z-index: auto }", ".foo{z-index:auto}");
}

#[test]
Expand Down

0 comments on commit 3fff94c

Please sign in to comment.