From 4aa6a9a727a53efbca6148d15041236a8dd6d83b Mon Sep 17 00:00:00 2001 From: xxchan Date: Fri, 28 Jun 2024 17:29:44 +0800 Subject: [PATCH] fix Signed-off-by: xxchan --- sqllogictest/src/substitution.rs | 2 +- tests/system_command/system_command.slt | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/sqllogictest/src/substitution.rs b/sqllogictest/src/substitution.rs index 57b05e1..7353620 100644 --- a/sqllogictest/src/substitution.rs +++ b/sqllogictest/src/substitution.rs @@ -22,7 +22,7 @@ impl Substitution { .replace("$__TEST_DIR__", &self.test_dir()) .replace("$__NOW__", &self.now())) } else { - subst::substitute(&input, self).map_err(SubstError) + subst::substitute(input, self).map_err(SubstError) } } diff --git a/tests/system_command/system_command.slt b/tests/system_command/system_command.slt index 161c5ef..fae1a11 100644 --- a/tests/system_command/system_command.slt +++ b/tests/system_command/system_command.slt @@ -1,7 +1,7 @@ control substitution on system ok -echo 114514 > ${__TEST_DIR__}/test.txt +echo 114514 > $__TEST_DIR__/test.txt query T select read("${__TEST_DIR__}/test.txt") @@ -23,10 +23,9 @@ echo "114514" 114514 -# Note: when substitution is on, we need to escape the backslash # Note: 1 blank line in the middle is ok, but not 2 system ok -echo "114\\n\\n514" +echo "114\n\n514" ---- 114