6 # Make a copy of the Fedora image so we can write to it then
8 cp ../images/fedora.img test.img
10 # Edit interactively. We have to simulate this by setting $EDITOR.
11 # The command will be: echo newline >> /tmp/file
12 export EDITOR='echo newline >>'
13 ./virt-edit -a test.img /etc/test3
14 if [ "$(../cat/virt-cat -a test.img /etc/test3)" != "a
21 echo "$0: error: mismatch in interactive editing of file /etc/test3"
26 # Edit non-interactively, only if we have 'perl' binary.
27 if perl --version >/dev/null 2>&1; then
28 ./virt-edit -a test.img /etc/test3 -e 's/^[a-f]/$lineno/'
29 if [ "$(../cat/virt-cat -a test.img /etc/test3)" != "1
36 echo "$0: error: mismatch in non-interactive editing of file /etc/test3"