diff options
author | Robert Hensing <roberth@users.noreply.github.com> | 2024-03-11 10:02:09 +0100 |
---|---|---|
committer | Jade Lovelace <lix@jade.fyi> | 2024-04-07 19:10:43 -0700 |
commit | b995c17f0eb8d9598f339c080c467101c1f55feb (patch) | |
tree | 1dea41c905bfdc6825135dd330c1fcf4cc0f9451 /tests/unit | |
parent | de20392c37c79f0aea03d4f580171178d896be15 (diff) |
Merge pull request #10208 from 9999years/print-strings-directly
`:print` strings directly in `nix repl`
(cherry picked from commit 3539172fd2f7cee639ce46423c58beca4231f2db)
Change-Id: I1972f3bf3b56312851f38288509d371d37f21677
Upstream-PR: https://github.com/NixOS/nix/pull/10208
Diffstat (limited to 'tests/unit')
-rw-r--r-- | tests/unit/libexpr-support/tests/libexpr.hh | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/unit/libexpr-support/tests/libexpr.hh b/tests/unit/libexpr-support/tests/libexpr.hh index b8e65aafe..4055784ca 100644 --- a/tests/unit/libexpr-support/tests/libexpr.hh +++ b/tests/unit/libexpr-support/tests/libexpr.hh @@ -71,7 +71,7 @@ namespace nix { if (arg.type() != nString) { return false; } - return std::string_view(arg.string.s) == s; + return std::string_view(arg.string.s) == std::string_view(s); } MATCHER_P(IsIntEq, v, fmt("The string is equal to \"%1%\"", v)) { @@ -106,7 +106,7 @@ namespace nix { if (arg.type() != nPath) { *result_listener << "Expected a path got " << arg.type(); return false; - } else if (std::string_view(arg.string.s) != p) { + } else if (std::string_view(arg._path) != p) { *result_listener << "Expected a path that equals \"" << p << "\" but got: " << arg.string.s; return false; } |