added ASCII symbol for micro SI unit prefix

This commit is contained in:
Ramzi Sabra
2020-03-25 09:06:45 +02:00
committed by Mateusz Pusz
parent 7aa381d525
commit dd6db61ea9
2 changed files with 30 additions and 20 deletions

View File

@@ -722,6 +722,16 @@ TEST_CASE("format string with %Aq for unit with no ASCII quantity unit symbol sh
CHECK(fmt::format("{:%Aq}", 123q_km_per_h) == "km/h");
}
TEST_CASE("format string with only %q for unit with ASCII quantity unit prefix symbol should print Unicode quantity unit prefix symbol only", "[text][fmt]")
{
CHECK(fmt::format("{:%Q%q}", 123q_uV) == "123\u00b5V");
}
TEST_CASE("format string with %Aq for unit with ASCII quantity unit prefix symbol should print ASCII quantity unit prefix symbol only", "[text][fmt]")
{
CHECK(fmt::format("{:%Q%Aq}", 123q_uV) == "123uV");
}
TEST_CASE("%q and %Q can be put anywhere in a format string", "[text][fmt]")
{
SECTION("no space")