commit - b5def47a1d71214197414530581e6d254b9b730536376acfcacb6d19d4259111
commit + ca114b13c896eb3d05de11e08ba4aff1fce3f84f11c931326475926a7cc8cd33
blob - e10a992ed8acf374f7354b6d201b29ce7a1baec88c016dd533af63acf4d93f28
blob + 027ec9d9e84e3db4ee37288daadff8cc0bcd63b94f40e8bb74ce642e8875c792
--- regress/cmdline/memleak.sh
+++ regress/cmdline/memleak.sh
test_memleak_done "$testroot" "$ret"
}
+test_memleak_histedit_basic() {
+ local testroot=`test_init memleak_histedit_basic`
+
+ got checkout $testroot/repo $testroot/wt > /dev/null
+ ret=$?
+ if [ $ret -ne 0 ]; then
+ test_done "$testroot" "$ret"
+ return 1
+ fi
+
+ echo "foo" > $testroot/wt/foo
+ (cd $testroot/wt && got add foo > /dev/null)
+ (cd $testroot/wt && got commit -m 'add foo' foo > /dev/null)
+ local commit_id=`git_show_head $testroot/repo`
+
+ echo -n > $testroot/histedit-script
+ for i in `seq 10`; do
+ echo "change $i" >> $testroot/wt/foo
+ (cd $testroot/wt && got commit -m 'change foo' foo > /dev/null)
+ echo "pick `git_show_head $testroot/repo`" \
+ >> $testroot/histedit-script
+ done
+
+ echo "last change" >> $testroot/wt/foo
+ (cd $testroot/wt && got commit -m 'last change to foo' foo > /dev/null)
+ echo "drop `git_show_head $testroot/repo`" >> $testroot/histedit-script
+
+ (cd $testroot/wt && got up -c $commit_id > /dev/null)
+ (cd $testroot/wt && $(check_memleak $testroot) \
+ got histedit -F $testroot/histedit-script > /dev/null)
+
+ test_memleak_done "$testroot" "$ret"
+}
+
+
test_parseargs "$@"
run_test test_memleak_add_basic
run_test test_memleak_send_basic
+run_test test_memleak_histedit_basic