commit - 3271ec93b5ca1c58fef468135fe380819cef6e9e
commit + 6c7991e2c2cc8ba244e56dd8542d99dedd2e4eb7
blob - 9fbf11cc0f5d4ed9d2e5dbc4d4461b1e50b9db14
blob + 34b0359bdba613f85023ac68b2b5cbcb3a7020fe
--- regress/tog/common.sh
+++ regress/tog/common.sh
fi
}
+trim()
+{
+ expr "$2" : "\(.\{1,$1\}\)"
+}
+
test_init()
{
local testname="$1"
run_test()
{
testfunc="$1"
- limits="$2"
if [ -n "$regress_run_only" ]; then
case "$regress_run_only" in
esac
fi
- if [ "${GOT_TEST_ALGO}" = sha256 -a -z "$limits" ]; then
- return
- fi
-
if [ -z "$GOT_TEST_QUIET" ]; then
echo -n "$testfunc "
fi
blob - a0945c59f1b465237892c32f9f441c9c57773cca
blob + c31964ba473354a0a9622d6c1724f4705d6d3dcd
--- regress/tog/diff.sh
+++ regress/tog/diff.sh
EOF
cat <<EOF >$testroot/view.expected
-[1/20] diff $commit_id1 $head_id_truncated
+$(trim 80 "[1/20] diff $commit_id1 $head_id_truncated")
commit $head_id (master)
from: Flan Hacker <flan_hacker@openbsd.org>
date: $date
EOF
cat <<EOF >$testroot/view.expected
-[1/16] diff $commit_id1 $head_id_truncated
+$(trim 80 "[1/16] diff $commit_id1 $head_id_truncated")
commit - $commit_id1
commit + $head_id
blob - $alpha_id_old
-alpha
+modified alpha again
blob - /dev/null
-blob + $new_id (mode 644)
+$(trim 80 "blob + $new_id (mode 644)")
--- /dev/null
+++ new
@@ -0,0 +1 @@
EOF
cat <<EOF >$testroot/view.expected
-[1/20] diff $id6 $id7
+$(trim 94 "[1/20] diff $id6 $id7")
commit $id7
from: Flan Hacker <flan_hacker@openbsd.org>
date: $date7
EOF
cat <<EOF >$testroot/view.expected
-[1/20] diff $id25 $id26
+$(trim 94 "[1/20] diff $id25 $id26")
commit $id26
from: Flan Hacker <flan_hacker@openbsd.org>
date: $date26
EOF
cat <<EOF >$testroot/view.expected
-[1/20] diff $id6 $id7
+$(trim 94 "[1/20] diff $id6 $id7")
commit $id7
from: Flan Hacker <flan_hacker@openbsd.org>
date: $date7
local date=$(date -u -r $(pop_idx 2 $@) +"%a %b %e %X %Y UTC")
cat <<-EOF >$testroot/view.expected
- [1/20] diff $lhs_id $rhs_id
+ $(trim 120 "[1/20] diff $lhs_id $rhs_id")
commit $rhs_id
from: Flan Hacker <flan_hacker@openbsd.org>
date: $date
rhs_id=$(pop_idx 8 $ids)
cat <<-EOF >$testroot/view.expected
- [1/10] diff $lhs_id $rhs_id
+ $(trim 120 "[1/10] diff $lhs_id $rhs_id")
commit - $lhs_id
commit + $rhs_id
blob - $(pop_idx 5 $alpha_ids)
EOF
cat <<EOF >$testroot/view.expected
-[1/20] diff $commit_id1 $head_id_truncated
+$(trim 80 "[1/20] diff $commit_id1 $head_id_truncated")
$head_id (master)
Flan Hacker <flan_hacker@openbsd.org>
$date
blob - f61a9bee3dba8a664892a50235335ed634ef92bd
blob + 67bde569cd6803d9fc6f03e82a82db50051d61c3
--- regress/tog/log.sh
+++ regress/tog/log.sh
EOF
cat <<EOF >$testroot/view.expected
-commit $head_id [1/1] master
+$(trim 80 "commit $head_id [1/1] master")
$ymd flan_hacker [master] adding the test tree
--------------------------------------------------------------------------------
-[1/40] diff /dev/null $head_id
+$(trim 80 "[1/40] diff /dev/null $head_id")
commit $head_id (master)
from: Flan Hacker <flan_hacker@openbsd.org>
date: $date
EOF
cat <<EOF >$testroot/view.expected
-commit $head_id [1/1] master |[1/40] diff /dev/null $head_id
+$(trim 61 "commit $head_id [1/1] master ")|$(trim 80 "[1/40] diff /dev/null $head_id")
$ymd flan_hacker [master] adding the test tree |commit $head_id (master)
|from: Flan Hacker <flan_hacker@openbsd.org>
|date: $date
|commit - /dev/null
|commit + $head_id
|blob - /dev/null
- |blob + $blobid_alpha (mode 644)
+ |$(trim 80 "blob + $blobid_alpha (mode 644)")
|--- /dev/null
|+++ alpha
|@@ -0,0 +1 @@
|+alpha
|blob - /dev/null
- |blob + $blobid_beta (mode 644)
+ |$(trim 80 "blob + $blobid_beta (mode 644)")
EOF
cd $testroot/repo && tog log
EOF
cat <<EOF >$testroot/view.expected
-commit $commit1 [1/2] master
+$(trim 80 "commit $commit1 [1/2] master")
$ymd flan_hacker $scrolled_msg
$ymd flan_hacker ng the test tree
EOF
EOF
cat <<EOF >$testroot/view.expected
-commit $head_id [1/1] master
+$(trim 80 "commit $head_id [1/1] master")
$ymd flan_hacker [master] adding the test tree
--------------------------------------------------------------------------------
EOF
cat <<EOF >$testroot/view.expected
-commit $head_id [1/1] master
+$(trim 80 "commit $head_id [1/1] master")
$ymd flan_hacker [master] adding the test tree
--------------------------------------------------------------------------------
EOF
cat <<-EOF >$testroot/view.expected
- commit $head_id [1/2] master
+ $(trim 80 "commit $head_id [1/2] master")
$ymd flan_hacker *[master] base commit
$ymd flan_hacker adding the test tree
EOF
# check marker is not drawn when not in a work tree
cat <<-EOF >$testroot/view.expected
- commit $head_id [1/2] master
+ $(trim 80 "commit $head_id [1/2] master")
$ymd flan_hacker [master] base commit
$ymd flan_hacker adding the test tree
EOF
EOF
cat <<-EOF >$testroot/view.expected
- commit $head_id [1/3] master
+ $(trim 80 "commit $head_id [1/3] master")
$ymd flan_hacker ~[master] new base mixed-commit
$ymd flan_hacker base commit
EOF
EOF
cat <<-EOF >$testroot/view.expected
- commit $id [1/2] master
+ $(trim 80 "commit $id [1/2] master")
$ymd flan_hacker [master] beta1
$ymd flan_hacker beta0
EOF
cat <<-EOF >$testroot/view.expected
- commit $(pop_idx 9 $@) [9/17] no more matches
+ $(trim 80 "commit $(pop_idx 9 $@) [9/17] no more matches")
$ymd flan_hacker alpha commit 14
$ymd flan_hacker alpha commit 13
$ymd flan_hacker alpha commit 12
blob - 5cbc7739a8711a9a4c7f9cd93e48ae4fa9be6cf4
blob + 0fcbbd78a8afe17bd2f12a187cecec268453d4ea
--- regress/tog/tree.sh
+++ regress/tog/tree.sh
EOF
cat <<EOF >$testroot/view.expected
-commit $head_id
+$(trim 48 "commit $head_id")
[1/4] /
alpha
EOF
cat <<EOF >$testroot/view.expected
-commit $head_id
+$(trim 48 "commit $head_id")
[2/4] /
alpha
------------------------------------------------
-commit $head_id
+$(trim 48 "commit $head_id")
[1/1] /beta
$head_id_short beta
EOF
cat <<EOF >$testroot/view.expected
-commit $head_id
+$(trim 48 "commit $head_id")
[1/5] /
alpha
EOF
cat <<-EOF >$testroot/view.expected
- commit $(pop_idx 8 $@)
+ $(trim 48 "commit $(pop_idx 8 $@)")
[1/7] /
alpha
fi
cat <<-EOF >$testroot/view.expected
- commit $(pop_idx 6 $@)
+ $(trim 48 "commit $(pop_idx 6 $@)")
[1/6] /
alpha
fi
cat <<-EOF >$testroot/view.expected
- commit $(pop_idx 9 $@)
+ $(trim 48 "commit $(pop_idx 9 $@)")
[1/8] /
alpha
fi
cat <<-EOF >$testroot/view.expected
- commit $(pop_idx 4 $@)
+ $(trim 48 "commit $(pop_idx 4 $@)")
[1/5] /
alpha
fi
cat <<-EOF >$testroot/view.expected
- commit $(pop_idx 1 $@)
+ $(trim 48 "commit $(pop_idx 1 $@)")
[1/4] /
alpha