# frozen_string_literal: true
require_relative "../test_helper"
module Lexer
class CommentsTest < Minitest::Spec
include SnapshotUtils
test "HTML comment with padding whitespace" do
assert_lexed_snapshot(%())
end
test "HTML comment with no whitespace" do
assert_lexed_snapshot(%())
end
test "HTML comment followed by html tag" do
assert_lexed_snapshot(%(
Hello
))
end
test "HTML comment followed by html tag with nested comment" do
assert_lexed_snapshot(%(
))
end
test "HTML comment with invalid closing tag --!>" do
assert_lexed_snapshot(%())
end
test "HTML comment with invalid closing tag --!> no whitespace" do
assert_lexed_snapshot(%())
end
test "HTML comment with invalid closing tag --!> followed by html tag" do
assert_lexed_snapshot(%(Hello
))
end
end
end