Skip to content

Commit

Permalink
Update sass-spec to 2024-11-15.
Browse files Browse the repository at this point in the history
  • Loading branch information
kaj committed Nov 17, 2024
1 parent f03d142 commit c3517d7
Show file tree
Hide file tree
Showing 18 changed files with 564 additions and 211 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ project adheres to
* Improved parse error handling (Issue #141, PR #201, PR #205).
Many parse errors now match the dart sass error message.
Also allow "loud" comments in more places.
* Updated sass-spec test suite to 2024-10-18.
* Updated sass-spec test suite to 2024-11-15.


## Release 0.28.10
Expand Down
13 changes: 13 additions & 0 deletions rsass/tests/spec/arguments/invocation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ mod function {
#[allow(unused)]
use super::runner;

mod arguments {
#[allow(unused)]
use super::runner;
}
mod error {
#[allow(unused)]
use super::runner;
Expand All @@ -29,6 +33,15 @@ mod function {
\n input.scss 3:14 root stylesheet",
);
}
mod sass {
#[allow(unused)]
use super::runner;

mod multi_line_arguments {
#[allow(unused)]
use super::runner;
}
}
}
}
mod mixin {
Expand Down
64 changes: 50 additions & 14 deletions rsass/tests/spec/css/custom_properties/trailing_whitespace.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,57 @@ fn runner() -> crate::TestRunner {
super::runner().with_cwd("trailing_whitespace")
}

#[test]
fn test() {
assert_eq!(
runner().ok(".trailing-whitespace {\
\n --space: value ;\
\n --tab: value\t;\
\n --newline: value\
mod sass {
#[allow(unused)]
use super::runner;
}
mod scss {
#[allow(unused)]
use super::runner;

#[test]
fn before_closing_brace() {
assert_eq!(
runner().ok("a {\
\n --b: c\
\n}\n"),
"a {\
\n --b: c ;\
\n}\n"
);
}
#[test]
fn newline() {
assert_eq!(
runner().ok("a {\
\n --b: c\
\n;\
\n --before-closing-brace: value\
\n}\n"),
".trailing-whitespace {\
\n --space: value ;\
\n --tab: value\t;\
\n --newline: value ;\
\n --before-closing-brace: value ;\
"a {\
\n --b: c ;\
\n}\n"
);
}
#[test]
fn space() {
assert_eq!(
runner().ok("a {\
\n --b: c ;\
\n}\n"),
"a {\
\n --b: c ;\
\n}\n"
);
}
#[test]
fn tab() {
assert_eq!(
runner().ok("a {\
\n --b: c\t;\
\n}\n"),
"a {\
\n --b: c\t;\
\n}\n"
);
);
}
}
92 changes: 89 additions & 3 deletions rsass/tests/spec/css/custom_properties/value_interpolation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,94 @@ fn runner() -> crate::TestRunner {
super::runner().with_cwd("value_interpolation")
}

#[test]
fn test() {
assert_eq!(
mod error {
#[allow(unused)]
use super::runner;

mod sass {
#[allow(unused)]
use super::runner;
}
}
mod sass {
#[allow(unused)]
use super::runner;
}
mod scss {
#[allow(unused)]
use super::runner;

#[test]
fn alone() {
assert_eq!(
runner().ok("a{\
\n --b: #{1 + 2};\
\n}\n"),
"a {\
\n --b: 3;\
\n}\n"
);
}
#[test]
fn in_ident() {
assert_eq!(
runner().ok("a{\
\n --b: c#{1 + 2}d;\
\n}\n"),
"a {\
\n --b: c3d;\
\n}\n"
);
}
#[test]
fn in_list() {
assert_eq!(
runner().ok("a{\
\n --b: c #{1 + 2} d;\
\n}\n"),
"a {\
\n --b: c 3 d;\
\n}\n"
);
}
#[test]
fn in_string() {
assert_eq!(
runner().ok("a{\
\n --b: \"c#{1 + 2}d\";\
\n}\n"),
"a {\
\n --b: \"c3d\";\
\n}\n"
);
}
#[test]
fn in_uri() {
assert_eq!(
runner().ok("a{\
\n --b: uri(c#{1 + 2}d);\
\n}\n"),
"a {\
\n --b: uri(c3d);\
\n}\n"
);
}
#[test]
fn linebreak_interpolation() {
assert_eq!(
runner().ok("a{\
\n --b: #{1 \
\n + \
\n 2};\
\n}\n"),
"a {\
\n --b: 3;\
\n}\n"
);
}
#[test]
fn value_interpolation() {
assert_eq!(
runner().ok(
".value-interpolation {\
\n // Interpolation is the only Sass construct that\'s supported in custom\
Expand All @@ -27,4 +112,5 @@ fn test() {
\n --in-uri: uri(foo3bar);\
\n}\n"
);
}
}
25 changes: 25 additions & 0 deletions rsass/tests/spec/directives/each.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
//! Tests auto-converted from "sass-spec/spec/directives/each.hrx"
#[allow(unused)]
fn runner() -> crate::TestRunner {
super::runner().with_cwd("each")
}

mod error {
#[allow(unused)]
use super::runner;

mod sass {
#[allow(unused)]
use super::runner;

mod multiline {
#[allow(unused)]
use super::runner;
}
}
}
mod sass {
#[allow(unused)]
use super::runner;
}
2 changes: 2 additions & 0 deletions rsass/tests/spec/directives/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ fn runner() -> crate::TestRunner {

mod at_root;

mod each;

// Ignoring "extend", not expected to work yet.

mod test_for;
Expand Down
Loading

0 comments on commit c3517d7

Please sign in to comment.