1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
|
#!/bin/sh
# vim: set filetype=sh :
# file: example.backslash2
# copyright: Bernd Schumacher <bernd.schumacher@hpe.com> (2007-2020)
# license: GNU General Public License, version 3
# description: check correct output of \ in interactive menu and in logfile
# see also: test.backslash2
#
# check correct output of \ in interactive menu and in logfile
#
#
set -e
set -u
. ./ia
eval "$ia_init"
# force error to check output
ia_add "txt=\"beforemiddleafter\""
ia_add "echo \"\$(echo \"\$txt\" | sed \"s/\\(.*\\)middle\\(.*\\)/start=<\\1> end=<\\2>/\")\""
ia_stdout "^1=\\\\ 2=\\\\\\\\ 3=\\\\\\\\\\\\$"
ia_add "/bin/echo \"1=\\\\ 2=\\\\\\\\ 3=\\\\\\\\\\\\\""
ia -c
|