test/test_plain.rb in jekyll-chatgpt-translate-0.0.13 vs test/test_plain.rb in jekyll-chatgpt-translate-0.0.14
- old
+ new
@@ -45,10 +45,24 @@
'first',
GptTranslate::Plain.new("* first\n\n\n\n").to_s
)
end
+ def test_ordered_list
+ assert_equal(
+ "first\n\nsecond\n\nthird",
+ GptTranslate::Plain.new("1. first\n\n2. second\n\n3. third").to_s
+ )
+ end
+
+ def test_compact_list
+ assert_equal(
+ "first\n\nsecond\n\nthird",
+ GptTranslate::Plain.new("* first\n* second\n* third").to_s
+ )
+ end
+
def test_links
assert_equal(
'Hello, dude!',
GptTranslate::Plain.new('Hello, [dude](https://www.google.com)!').to_s
)
@@ -86,8 +100,23 @@
GptTranslate::Plain.new('Hello, {% if a %} dude {% endif %}!').to_s
)
assert_equal(
'Hello, !',
GptTranslate::Plain.new('Hello, {% Java %}!').to_s
+ )
+ assert_equal(
+ 'Hello, !',
+ GptTranslate::Plain.new('Hello, {% plantuml "width=50%" %}!').to_s
+ )
+ end
+
+ def test_html_comments
+ assert_equal(
+ 'Hello, !',
+ GptTranslate::Plain.new('Hello, <!-- Java -->!').to_s
+ )
+ assert_equal(
+ 'Hello, !',
+ GptTranslate::Plain.new("Hello, <!-- \nJava\n -->!").to_s
)
end
end