#!/bin/sh
# -*- tcl -*-
# The next line is executed by /bin/sh, but not tcl \
exec tclsh "$0" ${1+"$@"}

# Test for deleting a line in one window of a two-pane screen.
# This used to make xvi loop indefinitely.
#
# Was https://github.com/martinwguy/xvi/issues/149

exec echo First line > 0149_file1
exec echo Second line >> 0149_file1
exec echo Other file > 0149_file2

source scripts/term
start_vi 0149_file1 0149_file2

test 10 "dd" 1 0 [list "Second line"]

exp_send ":q!\r"

stop_vi

exec rm -f 0149_file1 0149_file2

exit 0
