From bd75c5f51d7c61036540cc1f99a67fcec93471cd Mon Sep 17 00:00:00 2001 From: Casey Rodarmor Date: Tue, 8 Oct 2019 22:03:59 -0700 Subject: [PATCH] Avoid using error code `1` in integration tests (#486) Since error code 1 is commonly used to indicate failure, change those integration tests which test that a specific error code is returned to use something other than 1. --- tests/integration.rs | 50 ++++++++++++++++++++++---------------------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/tests/integration.rs b/tests/integration.rs index 0123e8a..7772816 100644 --- a/tests/integration.rs +++ b/tests/integration.rs @@ -472,75 +472,75 @@ integration_test! { name: backtick_code_interpolation_tab, justfile: " backtick-fail: -\techo {{`exit 1`}} +\techo {{`exit 200`}} ", stdout: "", - stderr: " error: Backtick failed with exit code 1 + stderr: " error: Backtick failed with exit code 200 | - 3 | echo {{`exit 1`}} - | ^^^^^^^^ + 3 | echo {{`exit 200`}} + | ^^^^^^^^^^ ", - status: 1, + status: 200, } integration_test! { name: backtick_code_interpolation_tabs, justfile: " backtick-fail: -\techo {{\t`exit 1`}} +\techo {{\t`exit 200`}} ", stdout: "", - stderr: "error: Backtick failed with exit code 1 + stderr: "error: Backtick failed with exit code 200 | -3 | echo {{ `exit 1`}} - | ^^^^^^^^ +3 | echo {{ `exit 200`}} + | ^^^^^^^^^^ ", - status: 1, + status: 200, } integration_test! { name: backtick_code_interpolation_inner_tab, justfile: " backtick-fail: -\techo {{\t`exit\t\t1`}} +\techo {{\t`exit\t\t200`}} ", stdout: "", - stderr: "error: Backtick failed with exit code 1 + stderr: "error: Backtick failed with exit code 200 | -3 | echo {{ `exit 1`}} - | ^^^^^^^^^^^^^^^ +3 | echo {{ `exit 200`}} + | ^^^^^^^^^^^^^^^^^ ", - status: 1, + status: 200, } integration_test! { name: backtick_code_interpolation_leading_emoji, justfile: " backtick-fail: -\techo šŸ˜¬{{`exit 1`}} +\techo šŸ˜¬{{`exit 200`}} ", stdout: "", - stderr: "error: Backtick failed with exit code 1 + stderr: "error: Backtick failed with exit code 200 | -3 | echo šŸ˜¬{{`exit 1`}} - | ^^^^^^^^ +3 | echo šŸ˜¬{{`exit 200`}} + | ^^^^^^^^^^ ", - status: 1, + status: 200, } integration_test! { name: backtick_code_interpolation_unicode_hell, justfile: " backtick-fail: -\techo \t\t\tšŸ˜¬éŽŒé¼¬{{\t\t`exit 1 # \t\t\tabc`}}\t\t\tšŸ˜¬éŽŒé¼¬ +\techo \t\t\tšŸ˜¬éŽŒé¼¬{{\t\t`exit 200 # \t\t\tabc`}}\t\t\tšŸ˜¬éŽŒé¼¬ ", stdout: "", - stderr: "error: Backtick failed with exit code 1 + stderr: "error: Backtick failed with exit code 200 | -3 | echo šŸ˜¬éŽŒé¼¬{{ `exit 1 # abc`}} šŸ˜¬éŽŒé¼¬ - | ^^^^^^^^^^^^^^^^^^^^^^^^^^ +3 | echo šŸ˜¬éŽŒé¼¬{{ `exit 200 # abc`}} šŸ˜¬éŽŒé¼¬ + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ", - status: 1, + status: 200, } integration_test! {