aboutsummaryrefslogtreecommitdiff
path: root/tests/unit
diff options
context:
space:
mode:
authoreldritch horrors <pennae@lix.systems>2024-03-08 06:50:31 +0100
committereldritch horrors <pennae@lix.systems>2024-03-09 03:37:35 -0700
commit7673312ccc179825033e4458604ddd2e9ae8d162 (patch)
tree7f81aef04abeef0211030c64f186da3cd0638498 /tests/unit
parentc8649239280360877a33c7aacf14889cb441f643 (diff)
Merge pull request #9928 from 9999years/error-messages-in-nix-repl
Improve error printing in `nix repl` (cherry picked from commit a8050d9b83052e4b5c52bf2d116381aedec3a93e) Change-Id: I588f92d1dd4c546c98788b71403cc034f5e7129a
Diffstat (limited to 'tests/unit')
-rw-r--r--tests/unit/libexpr/value/print.cc44
1 files changed, 4 insertions, 40 deletions
diff --git a/tests/unit/libexpr/value/print.cc b/tests/unit/libexpr/value/print.cc
index c4264a38d..c1de3a6a9 100644
--- a/tests/unit/libexpr/value/print.cc
+++ b/tests/unit/libexpr/value/print.cc
@@ -460,19 +460,7 @@ TEST_F(ValuePrintingTests, ansiColorsError)
test(vError,
ANSI_RED
- "«"
- ANSI_RED
- "error:"
- ANSI_NORMAL
- "\n … while calling the '"
- ANSI_MAGENTA
- "throw"
- ANSI_NORMAL
- "' builtin\n\n "
- ANSI_RED
- "error:"
- ANSI_NORMAL
- " uh oh!»"
+ "«error: uh oh!»"
ANSI_NORMAL,
PrintOptions {
.ansiColors = true,
@@ -501,19 +489,7 @@ TEST_F(ValuePrintingTests, ansiColorsDerivationError)
test(vAttrs,
"{ drvPath = "
ANSI_RED
- "«"
- ANSI_RED
- "error:"
- ANSI_NORMAL
- "\n … while calling the '"
- ANSI_MAGENTA
- "throw"
- ANSI_NORMAL
- "' builtin\n\n "
- ANSI_RED
- "error:"
- ANSI_NORMAL
- " uh oh!»"
+ "«error: uh oh!»"
ANSI_NORMAL
"; type = "
ANSI_MAGENTA
@@ -527,19 +503,7 @@ TEST_F(ValuePrintingTests, ansiColorsDerivationError)
test(vAttrs,
ANSI_RED
- "«"
- ANSI_RED
- "error:"
- ANSI_NORMAL
- "\n … while calling the '"
- ANSI_MAGENTA
- "throw"
- ANSI_NORMAL
- "' builtin\n\n "
- ANSI_RED
- "error:"
- ANSI_NORMAL
- " uh oh!»"
+ "«error: uh oh!»"
ANSI_NORMAL,
PrintOptions {
.ansiColors = true,
@@ -560,7 +524,7 @@ TEST_F(ValuePrintingTests, ansiColorsAssert)
state.mkThunk_(v, &expr);
test(v,
- ANSI_RED "«" ANSI_RED "error:" ANSI_NORMAL " assertion '" ANSI_MAGENTA "false" ANSI_NORMAL "' failed»" ANSI_NORMAL,
+ ANSI_RED "«error: assertion 'false' failed»" ANSI_NORMAL,
PrintOptions {
.ansiColors = true,
.force = true