Read about our upcoming Code of Conduct on this issue

Commit 22948373 authored by Martin von Zweigbergk's avatar Martin von Zweigbergk
Browse files

tests: make checkheads tests bash-compatible by avoiding `echo '\n'`

Using `echo` with escape codes is not portable, so this patch replaces
it by `printf`. I also changed several nearby lines to `printf` for
consistency.
parent 9035901412e6
Pipeline #5459 passed with stage
in 5 minutes and 19 seconds
......@@ -28,12 +28,12 @@ setuprepos() {
hg clone server client
if [ "$1" = "single-head" ]; then
echo >> "server/.hg/hgrc" "[experimental]"
echo >> "server/.hg/hgrc" "# enforce a single name per branch"
echo >> "server/.hg/hgrc" "single-head-per-branch = yes"
printf "[experimental]\n" >> "server/.hg/hgrc"
printf "# enforce a single name per branch\n" >> "server/.hg/hgrc"
printf "single-head-per-branch = yes\n" >> "server/.hg/hgrc"
echo >> "client/.hg/hgrc" "[ui]"
echo >> "client/.hg/hgrc" "# simpler log output"
echo >> "client/.hg/hgrc" 'logtemplate = "{node|short} [{branch}{if(topic, ":{topic}")}] ({phase}): {desc}\\n"'
printf "[ui]\n" >> "client/.hg/hgrc"
printf "# simpler log output\n" >> "client/.hg/hgrc"
printf 'logtemplate = "{node|short} [{branch}{if(topic, ":{topic}")}] ({phase}): {desc}\\n"\n' >> "client/.hg/hgrc"
fi
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment