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
This commit is contained in:
committed by
Jade Lovelace
parent
de20392c37
commit
b995c17f0e
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user