@@ -105,6 +105,24 @@ def test_format_pre_input(empty_repo, empty_release, case_name):
105105 assert parse_mode == FORMATTING_PARAMS ["pre" ]["mode" ]
106106 assert message == dst_content
107107
108+ @pytest .mark .parametrize ("case_name" , get_test_cases ())
109+ def test_format_html_input (empty_repo , empty_release , case_name ):
110+ release_note_format = FORMATTING_PARAMS ["html" ]["format" ]
111+
112+ orig_path = os .path .join (DATA_DIR , f"{ case_name } .orig" )
113+ dst_path = os .path .join (DATA_DIR , f"{ case_name } .html" )
114+ with open (orig_path , 'r' , encoding = 'utf-8' , newline = "" ) as f :
115+ orig_content = f .read ()
116+ with open (dst_path , 'r' , encoding = 'utf-8' , newline = "" ) as f :
117+ dst_content = f .read ()
118+
119+ empty_release .body = orig_content
120+
121+ message , parse_mode , entities = format_release_message (release_note_format , empty_repo , empty_release )
122+
123+ assert parse_mode in (FORMATTING_PARAMS ["html" ]["mode" ], FORMATTING_PARAMS ["markdown" ]["mode" ])
124+ assert message == dst_content
125+
108126@pytest .mark .parametrize ("case_name" , get_test_cases ())
109127def test_format_markdown_input (empty_repo , empty_release , case_name ):
110128 release_note_format = FORMATTING_PARAMS ["markdown" ]["format" ]
0 commit comments