Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions test/markdown/markdown_to_plaintext_test.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
require 'test_helper'
require_relative '../../lib/markdown_converter.rb'

class ArticleTest < ActiveSupport::TestCase

#行頭に1つのスペースを含む項番なしリストのネストの入力が,ネストではない項番なしリストの出力になる問題を検証するテスト
test "should get nesting of unordered list" do
assert JayFlavoredMarkdownToPlainTextConverter.new("* aaa\n * aaa").content == "* aaa\n * aaa"
end

#文字列の下行の '-' の入力が,2段階見出しの出力になる問題を検証するテスト
test "should get '-' below 'aaa'" do
assert JayFlavoredMarkdownToPlainTextConverter.new("aaa\n-").content == "aaa\n-"
end

#項番付きリストの下行の項番なしリストの入力が,項番付きリストの出力になる問題を検証するテスト
test "should get unordered list below ordered list" do
assert JayFlavoredMarkdownToPlainTextConverter.new("+ aaa\n* aaa").content == "(1) aaa\n* aaa"
end

#項番なしリストの下行の項番付きリストの入力が,項番なしリストの出力になる問題を検証するテスト
test "should get ordered list below unordered list" do
assert JayFlavoredMarkdownToPlainTextConverter.new("* aaa\n+ aaa").content == "* aaa\n(1) aaa"
end
end