Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit27a9bb5

Browse files
committed
test: backfill formatting coverage for all selector combinators
1 parent278edb5 commit27a9bb5

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

‎lib/syntax_tree/css/format.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,10 @@ def visit_combinator(node)
111111
casenode.value
112112
whenWhitespaceToken
113113
q.text(" ")
114+
whenArray
115+
q.text(" ")
116+
node.value.each{ |val|val.format(q)}
117+
q.text(" ")
114118
else
115119
q.text(" ")
116120
node.value.format(q)

‎test/selectors_test.rb

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -251,6 +251,13 @@ class SelectorsTest < Minitest::Spec
251251
".outer section.foo > table.bar tr",
252252
)
253253
end
254+
255+
it"handles all the combinators"do
256+
assert_selector_format(
257+
"a b > c + d ~ e || f",
258+
"a b > c + d ~ e || f",
259+
)
260+
end
254261
end
255262

256263
private

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp