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