#!/bin/sh
#
# GitHub issue #376 regarding a segfault

. libtest.sh
. libgit.sh
. "$source_dir/util.sh"

export LINES=5

steps '
	:save-display start.screen
	d
	@
	j
	u
	:save-display result.screen
'

tigrc <<EOF
set vertical-split = no
EOF

in_work_dir create_dirty_workdir

test_tig

assert_equals 'start.screen' <<EOF
$YYY_MM_DD_HH_MM +0000 Not Committed Yet o Unstaged changes
2009-02-13 23:31 +0000 A. U. Thor        I [master] Initial commit

[main] Unstaged changes                                                     100%
EOF

assert_equals 'result.screen' <<EOF
+++ b/.j
@@ -6,6 +6,4 @@
 5
[stage] Unstaged changes to '.j' - line 13 of 101                            12%
EOF
