From 0309488a66ffc4e6672772e37bcec2f92019efc0 Mon Sep 17 00:00:00 2001 From: Ben Burdette Date: Fri, 19 Jun 2020 16:46:49 -0600 Subject: [PATCH] fmt -> hintfmt test --- src/libutil/tests/logging.cc | 8 ++++++++ 1 file changed, 8 insertions(+) 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(