Skip to content

Commit 6cbedb7

Browse files
authored
Update sample/test rhtml files to comply with Herb (#117)
* Multiple spaces between the start `<%=` and expression is pointed out by Herb linter * `case` doesn't have `when` is a syntax error
1 parent 84f5f58 commit 6cbedb7

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

samples/cgi/helloerb.rhtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
<p><%= _("QUERY_STRING") %>: <%= cgi.query_string %></p>
1919
</div>
2020
<p><%= _("Call a library method which has another textdomain.") %></p>
21-
<div class="locale"><%= lib.hello %></div>
21+
<div class="locale"><%= lib.hello %></div>
2222
<p><a href="/"><%= _("Back") %></a></p>
2323

2424
<div class="copyright">

test/fixtures/erb/case.rhtml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@
99
</head>
1010
<body>
1111
<%= _('Hello') %>
12-
<% case 1 %>
12+
<% case %>
13+
<% when true %>
1314
<% end %>
1415
<%= _('World') %>
1516
</body>

test/test_parser.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ def test_case
223223

224224
if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new('3.0.0')
225225
assert_target("Hello", ["#{path}:11"])
226-
assert_target("World", ["#{path}:14"])
226+
assert_target("World", ["#{path}:15"])
227227
else
228228
assert_target("Hello", ["#{path}:11"])
229229
assert_nil(@ary.detect {|elem| elem.msgid == 'World'}) # Not detected. see PR #91
@@ -275,7 +275,7 @@ def test_case
275275
@ary = GetText::ErubiParser.parse(path)
276276

277277
assert_target("Hello", ["#{path}:11"])
278-
assert_target("World", ["#{path}:14"]) # Detected with Erubi
278+
assert_target("World", ["#{path}:15"]) # Detected with Erubi
279279
end
280280
end
281281

0 commit comments

Comments
 (0)