File tree Expand file tree Collapse file tree 1 file changed +13
-6
lines changed Expand file tree Collapse file tree 1 file changed +13
-6
lines changed Original file line number Diff line number Diff line change @@ -1622,12 +1622,19 @@ TEST_F (usfm_html, get_word_level_attributes_id)
1622
1622
editor_usfm2html.load (usfm);
1623
1623
editor_usfm2html.stylesheet (styles_logic_standard_sheet ());
1624
1624
editor_usfm2html.run ();
1625
- // Todo fix this.
1626
- // const std::map<int,std::string> attributes = editor_usfm2html.get_word_level_attributes();
1627
- // for (const auto& [id, text] : attributes) {
1628
- // EXPECT_TRUE(std::to_string(id).find("0") == std::string::npos);
1629
- // }
1630
- // EXPECT_EQ(id_count, attributes.size());
1625
+ std::string html = editor_usfm2html.get ();
1626
+ int count {};
1627
+ do {
1628
+ constexpr const std::string_view b_wla{" b-wla" };
1629
+ const size_t pos = html.find (b_wla);
1630
+ if (pos == std::string::npos)
1631
+ break ;
1632
+ html.erase (0 , pos + b_wla.size ());
1633
+ count++;
1634
+ EXPECT_TRUE (html.substr (0 , 10 ).find (" 0" ) == std::string::npos);
1635
+ }
1636
+ while (true );
1637
+ EXPECT_EQ (count, id_count);
1631
1638
}
1632
1639
1633
1640
You can’t perform that action at this time.
0 commit comments