lib/path/tests: Fix property tests when "-n" is generated
When "-n" is generated by the property tests, it causes `echo` to not output the string since it's interpreted as an option. Apparently there's no good way to print "-n" with `echo` [1], so switching to `printf` instead [1]: https://unix.stackexchange.com/questions/85846/how-can-i-print-n-with-echo
This commit is contained in:
parent
b326f62dcf
commit
041b044a66
|
@ -55,7 +55,7 @@ fi
|
||||||
declare -a strings=()
|
declare -a strings=()
|
||||||
mkdir -p "$tmp/strings"
|
mkdir -p "$tmp/strings"
|
||||||
while IFS= read -r -d $'\0' str; do
|
while IFS= read -r -d $'\0' str; do
|
||||||
echo -n "$str" > "$tmp/strings/${#strings[@]}"
|
printf "%s" "$str" > "$tmp/strings/${#strings[@]}"
|
||||||
strings+=("$str")
|
strings+=("$str")
|
||||||
done < <(awk \
|
done < <(awk \
|
||||||
-f "$SCRIPT_DIR"/generate.awk \
|
-f "$SCRIPT_DIR"/generate.awk \
|
||||||
|
|
Loading…
Reference in a new issue