Skip to content

Commit

Permalink
regression: test 027: test refresh code
Browse files Browse the repository at this point in the history
Signed-off-by: Josef 'Jeff' Sipek <[email protected]>
  • Loading branch information
jeffpc committed Jan 20, 2008
1 parent 2f1beb0 commit 1a2550b
Show file tree
Hide file tree
Showing 2 changed files with 71 additions and 0 deletions.
31 changes: 31 additions & 0 deletions regression/t-027.out
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
% setup_repo
% guilt-refresh (no applied patches)
No patches applied; try guilt-push first
% list_files
d .git/patches
d .git/patches/master
f 22930c6d1f1938f298a4fca51c57e4b47171db21 .git/patches/master/mode
f 5d8322e2edfca0589cc24df9c09985a544591a2c .git/patches/master/add
f 8bdf2abdb045e63bb877890db12afcd5a2f023eb .git/patches/master/remove
f bacb4aad8a55fe4e7aa58a9ae169990bb764069f .git/patches/master/series
f bc9ab2e0f5db99d483961e956e814d963f0309f8 .git/patches/master/modify
f da39a3ee5e6b4b0d3255bfef95601890afd80709 .git/patches/master/status
% git-reset --hard HEAD
HEAD is now at d485041... initial
% guilt-push modify
Applying patch..modify
Patch applied.
% guilt-refresh (applied patch)
All patches popped.
Applying patch..modify
Patch applied.
% list_files
d .git/patches
d .git/patches/master
f 22930c6d1f1938f298a4fca51c57e4b47171db21 .git/patches/master/mode
f 42d2613ecee1b642b2b8b7b7a9cef165bf456e48 .git/patches/master/modify
f 5d8322e2edfca0589cc24df9c09985a544591a2c .git/patches/master/add
f 8bdf2abdb045e63bb877890db12afcd5a2f023eb .git/patches/master/remove
f bacb4aad8a55fe4e7aa58a9ae169990bb764069f .git/patches/master/series
f bc9ab2e0f5db99d483961e956e814d963f0309f8 .git/patches/master/modify~
f de06c667ff8f99131cb05bf1ce42083449db78df .git/patches/master/status
40 changes: 40 additions & 0 deletions regression/t-027.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
#!/bin/bash
#
# Test the refresh code
#

source $REG_DIR/scaffold

begin "setup_repo"
setup_repo

function fixup_time_info
{
touch -d "$GIT_COMMITTER_DATE" ".git/patches/master/$1"
}

begin "guilt-refresh (no applied patches)"
echo abcdef >> def
shouldfail guilt-refresh 2>&1

begin "list_files"
list_files

begin "git-reset --hard HEAD"
git-reset --hard HEAD

begin "guilt-push modify"
guilt-push modify 2>&1

begin "guilt-refresh (applied patch)"
echo abcdef >> def
guilt-refresh
guilt-pop
fixup_time_info modify
guilt-push modify

begin "list_files"
list_files

# FIXME: we should check that the patch actually contains what it should,
# test arguments work the way they should

0 comments on commit 1a2550b

Please sign in to comment.