diff options
author | Ben Burdette <bburdette@gmail.com> | 2020-06-19 16:46:49 -0600 |
---|---|---|
committer | Ben Burdette <bburdette@gmail.com> | 2020-06-19 16:46:49 -0600 |
commit | 0309488a66ffc4e6672772e37bcec2f92019efc0 (patch) | |
tree | f13b75c298bc961fbf5a77ca00870cd568d22afa /src/libutil | |
parent | 397dbe114e78682a370832e31269147b9d6ac6fa (diff) |
fmt -> hintfmt test
Diffstat (limited to 'src/libutil')
-rw-r--r-- | src/libutil/tests/logging.cc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/libutil/tests/logging.cc b/src/libutil/tests/logging.cc index e208efc07..104f3e02c 100644 --- a/src/libutil/tests/logging.cc +++ b/src/libutil/tests/logging.cc @@ -266,6 +266,14 @@ namespace nix { } + TEST(hintfmt, fmtToHintfmt) { + + auto hint = hintfmt(fmt("the color of this this text is %1%", "not yellow")); + + ASSERT_STREQ(hint.str().c_str(), "the color of this this text is not yellow"); + + } + TEST(hintfmt, tooFewArguments) { ASSERT_STREQ( |