X-Git-Url: https://git.distorted.org.uk/~mdw/stgit/blobdiff_plain/0f4eba6a37c1a5454560b097873e5a22bfcde908..490add07e9490b2654d22ca2cd3b8dcc0cc0cc9b:/t/t1400-patch-history.sh diff --git a/t/t1400-patch-history.sh b/t/t1400-patch-history.sh index 34162f4..5b842d0 100755 --- a/t/t1400-patch-history.sh +++ b/t/t1400-patch-history.sh @@ -21,7 +21,7 @@ test_expect_success \ stg new foo -m "Foo Patch" && echo foo > test && echo foo2 >> test && stg add test && - stg refresh + stg refresh --annotate="foo notes" ' test_expect_success \ @@ -35,10 +35,20 @@ test_expect_success \ test_expect_success \ 'Check the "new" and "refresh" logs' \ ' - stg log foo | grep -q -e "^new" && - stg log foo | grep -q -e "^refresh" && - stg log | grep -q -e "^new" && - stg log | grep -q -e "^refresh" + stg log --full foo | grep -q -e "^new" && + stg log --full foo | grep -q -e "^refresh" && + stg log --full | grep -q -e "^new" && + stg log --full | grep -q -e "^refresh" + ' + +test_expect_success \ + 'Check the log annotation' \ + ' + stg log foo | grep -q -e "\[refresh\] foo notes " && + stg log bar | grep -q -e "\[refresh\] " && + stg refresh -p foo --annotate="foo notes 2" && + stg log foo | grep -q -v -e "\[refresh\] foo notes " && + stg log foo | grep -q -e "\[refresh\] foo notes 2" ' test_expect_success \ @@ -47,16 +57,16 @@ test_expect_success \ stg pop && echo foo > test2 && stg add test2 && stg refresh && stg push && - stg log | grep -q -e "^push " + stg log --full | grep -q -e "^push " ' test_expect_success \ 'Check the "push(f)" log' \ ' stg pop && - stg refresh -m "Foo2 Patch" && + stg edit -m "Foo2 Patch" && stg push && - stg log | grep -q -e "^push(f) " + stg log --full | grep -q -e "^push(f) " ' test_expect_success \ @@ -65,7 +75,7 @@ test_expect_success \ stg pop && echo foo2 > test && stg refresh && stg push && - stg log | grep -q -e "^push(m) " + stg log --full | grep -q -e "^push(m) " ' test_expect_success \ @@ -75,22 +85,21 @@ test_expect_success \ stg pop && echo foo > test && stg refresh && ! stg push && - stg log | grep -q -e "^push(c) " + stg log --full | grep -q -e "^push(c) " ' test_expect_success \ 'Check the push "undo" log' \ ' - stg status --reset && stg push --undo && - stg log bar | grep -q -e "^undo " + stg log --full bar | grep -q -e "^undo " ' test_expect_success \ 'Check the refresh "undo" log' \ ' stg refresh --undo && - stg log | grep -q -e "^undo " + stg log --full | grep -q -e "^undo " ' test_done