ttest: echo is not portable when using backslash - neatvi - [fork] simple vi-type editor with UTF-8 support
(HTM) git clone git://src.adamsgaard.dk/neatvi
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) README
---
(DIR) commit 0aeab359ed17ba7247ce8cc1619a374a58ba8abe
(DIR) parent debb1a79efbabb95f0ce6383bc091c96b5bf1edc
(HTM) Author: Ali Gholami Rudi <ali@rudi.ir>
Date: Sat, 9 Oct 2021 18:25:43 +0330
ttest: echo is not portable when using backslash
Diffstat:
M test/e08.sh | 2 +-
M test/e0e.sh | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
---
(DIR) diff --git a/test/e08.sh b/test/e08.sh
t@@ -4,7 +4,7 @@ echo ":a"
echo "abc"
echo "axy"
echo "."
-echo ':%s/a(..)/\\1a/g'
+printf ':%%s/a(..)/\\1a/g\n'
echo ":w"
echo ":q"
(DIR) diff --git a/test/e0e.sh b/test/e0e.sh
t@@ -4,7 +4,7 @@ echo ":a"
echo "abc"
echo "def"
echo "."
-echo ':%s/(b.*)$/(\\1)/g'
+printf ':%%s/(b.*)$/(\\1)/g\n'
echo ":w"
echo ":q"