Skip to content

Commit

Permalink
regression: test 025: test new 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 20cb4e4 commit f192bc8
Show file tree
Hide file tree
Showing 2 changed files with 384 additions and 0 deletions.
318 changes: 318 additions & 0 deletions regression/t-025.out
Original file line number Diff line number Diff line change
@@ -0,0 +1,318 @@
% setup_repo
% guilt-new file
All patches popped.
Applying patch..file
Patch applied.
% list_files
d .git/patches
d .git/patches/master
f 22930c6d1f1938f298a4fca51c57e4b47171db21 .git/patches/master/mode
f 5d8322e2edfca0589cc24df9c09985a544591a2c .git/patches/master/add
f 6e65775e6ed741dc0219e6008f7e0b06add0b395 .git/patches/master/series
f 8bdf2abdb045e63bb877890db12afcd5a2f023eb .git/patches/master/remove
f bc9ab2e0f5db99d483961e956e814d963f0309f8 .git/patches/master/modify
f da39a3ee5e6b4b0d3255bfef95601890afd80709 .git/patches/master/file
f dfcdf91459f75509d815705c5769d71fcd5f73b0 .git/patches/master/status
% guilt-new dir/file
Now at file.
Applying patch..dir/file
Patch applied.
% list_files
d .git/patches
d .git/patches/master
d .git/patches/master/dir
f 0b488d592b2a401d638ca87dacaf60a061f84c3c .git/patches/master/series
f 22930c6d1f1938f298a4fca51c57e4b47171db21 .git/patches/master/mode
f 5d8322e2edfca0589cc24df9c09985a544591a2c .git/patches/master/add
f 6269f564bbe7f83c89fa65efc67b601053db1292 .git/patches/master/status
f 8bdf2abdb045e63bb877890db12afcd5a2f023eb .git/patches/master/remove
f bc9ab2e0f5db99d483961e956e814d963f0309f8 .git/patches/master/modify
f da39a3ee5e6b4b0d3255bfef95601890afd80709 .git/patches/master/dir/file
f da39a3ee5e6b4b0d3255bfef95601890afd80709 .git/patches/master/file
% guilt-new dir/subdir/file
Now at dir/file.
Applying patch..dir/subdir/file
Patch applied.
% list_files
d .git/patches
d .git/patches/master
d .git/patches/master/dir
d .git/patches/master/dir/subdir
f 00f4d968227f29edd1d6dc985c1650f21a343486 .git/patches/master/series
f 22930c6d1f1938f298a4fca51c57e4b47171db21 .git/patches/master/mode
f 2db31bd49d73b8d16773a4e6c9c5c7ccfb4a3eda .git/patches/master/status
f 5d8322e2edfca0589cc24df9c09985a544591a2c .git/patches/master/add
f 8bdf2abdb045e63bb877890db12afcd5a2f023eb .git/patches/master/remove
f bc9ab2e0f5db99d483961e956e814d963f0309f8 .git/patches/master/modify
f da39a3ee5e6b4b0d3255bfef95601890afd80709 .git/patches/master/dir/file
f da39a3ee5e6b4b0d3255bfef95601890afd80709 .git/patches/master/dir/subdir/file
f da39a3ee5e6b4b0d3255bfef95601890afd80709 .git/patches/master/file
% guilt-push --all
Applying patch..modify
Patch applied.
Applying patch..add
Patch applied.
Applying patch..remove
Patch applied.
Applying patch..mode
Patch applied.
% guilt-new append
Now at mode.
Applying patch..append
Patch applied.
% list_files
d .git/patches
d .git/patches/master
d .git/patches/master/dir
d .git/patches/master/dir/subdir
f 22930c6d1f1938f298a4fca51c57e4b47171db21 .git/patches/master/mode
f 578dd8fc3317db2c8fdab355ce5828d00218990d .git/patches/master/series
f 5d8322e2edfca0589cc24df9c09985a544591a2c .git/patches/master/add
f 8bdf2abdb045e63bb877890db12afcd5a2f023eb .git/patches/master/remove
f b9290e9e8b331a605a494f5a66ef9b64bce69c80 .git/patches/master/status
f bc9ab2e0f5db99d483961e956e814d963f0309f8 .git/patches/master/modify
f da39a3ee5e6b4b0d3255bfef95601890afd80709 .git/patches/master/append
f da39a3ee5e6b4b0d3255bfef95601890afd80709 .git/patches/master/dir/file
f da39a3ee5e6b4b0d3255bfef95601890afd80709 .git/patches/master/dir/subdir/file
f da39a3ee5e6b4b0d3255bfef95601890afd80709 .git/patches/master/file
% guilt-pop --all
All patches popped.
% guilt-new prepend
All patches popped.
Applying patch..prepend
Patch applied.
% list_files
d .git/patches
d .git/patches/master
d .git/patches/master/dir
d .git/patches/master/dir/subdir
f 1ef04b4f4149870b3f06b5f99b9d9fc260cebc67 .git/patches/master/series
f 22930c6d1f1938f298a4fca51c57e4b47171db21 .git/patches/master/mode
f 5d8322e2edfca0589cc24df9c09985a544591a2c .git/patches/master/add
f 8bdf2abdb045e63bb877890db12afcd5a2f023eb .git/patches/master/remove
f b8771a22a975451e15405965d70c2edda932cdba .git/patches/master/status
f bc9ab2e0f5db99d483961e956e814d963f0309f8 .git/patches/master/modify
f da39a3ee5e6b4b0d3255bfef95601890afd80709 .git/patches/master/append
f da39a3ee5e6b4b0d3255bfef95601890afd80709 .git/patches/master/dir/file
f da39a3ee5e6b4b0d3255bfef95601890afd80709 .git/patches/master/dir/subdir/file
f da39a3ee5e6b4b0d3255bfef95601890afd80709 .git/patches/master/file
f da39a3ee5e6b4b0d3255bfef95601890afd80709 .git/patches/master/prepend
% guilt-new "white space"
Now at prepend.
Applying patch..white space
Patch applied.
% list_files
d .git/patches
d .git/patches/master
d .git/patches/master/dir
d .git/patches/master/dir/subdir
f 22930c6d1f1938f298a4fca51c57e4b47171db21 .git/patches/master/mode
f 5be407ce965bd8f89a7ba3f9b3bdb4d80cf79f4c .git/patches/master/series
f 5d8322e2edfca0589cc24df9c09985a544591a2c .git/patches/master/add
f 8bdf2abdb045e63bb877890db12afcd5a2f023eb .git/patches/master/remove
f b29a8935ca88bce635ce3b6f42ea84eacca8af25 .git/patches/master/status
f bc9ab2e0f5db99d483961e956e814d963f0309f8 .git/patches/master/modify
f da39a3ee5e6b4b0d3255bfef95601890afd80709 .git/patches/master/append
f da39a3ee5e6b4b0d3255bfef95601890afd80709 .git/patches/master/dir/file
f da39a3ee5e6b4b0d3255bfef95601890afd80709 .git/patches/master/dir/subdir/file
f da39a3ee5e6b4b0d3255bfef95601890afd80709 .git/patches/master/file
f da39a3ee5e6b4b0d3255bfef95601890afd80709 .git/patches/master/prepend
f da39a3ee5e6b4b0d3255bfef95601890afd80709 .git/patches/master/white space
% gult-new prepend
patch 'prepend' already exist
% list_files
d .git/patches
d .git/patches/master
d .git/patches/master/dir
d .git/patches/master/dir/subdir
f 22930c6d1f1938f298a4fca51c57e4b47171db21 .git/patches/master/mode
f 5be407ce965bd8f89a7ba3f9b3bdb4d80cf79f4c .git/patches/master/series
f 5d8322e2edfca0589cc24df9c09985a544591a2c .git/patches/master/add
f 8bdf2abdb045e63bb877890db12afcd5a2f023eb .git/patches/master/remove
f b29a8935ca88bce635ce3b6f42ea84eacca8af25 .git/patches/master/status
f bc9ab2e0f5db99d483961e956e814d963f0309f8 .git/patches/master/modify
f da39a3ee5e6b4b0d3255bfef95601890afd80709 .git/patches/master/append
f da39a3ee5e6b4b0d3255bfef95601890afd80709 .git/patches/master/dir/file
f da39a3ee5e6b4b0d3255bfef95601890afd80709 .git/patches/master/dir/subdir/file
f da39a3ee5e6b4b0d3255bfef95601890afd80709 .git/patches/master/file
f da39a3ee5e6b4b0d3255bfef95601890afd80709 .git/patches/master/prepend
f da39a3ee5e6b4b0d3255bfef95601890afd80709 .git/patches/master/white space
% gult-new mode
patch 'mode' already exist
% list_files
d .git/patches
d .git/patches/master
d .git/patches/master/dir
d .git/patches/master/dir/subdir
f 22930c6d1f1938f298a4fca51c57e4b47171db21 .git/patches/master/mode
f 5be407ce965bd8f89a7ba3f9b3bdb4d80cf79f4c .git/patches/master/series
f 5d8322e2edfca0589cc24df9c09985a544591a2c .git/patches/master/add
f 8bdf2abdb045e63bb877890db12afcd5a2f023eb .git/patches/master/remove
f b29a8935ca88bce635ce3b6f42ea84eacca8af25 .git/patches/master/status
f bc9ab2e0f5db99d483961e956e814d963f0309f8 .git/patches/master/modify
f da39a3ee5e6b4b0d3255bfef95601890afd80709 .git/patches/master/append
f da39a3ee5e6b4b0d3255bfef95601890afd80709 .git/patches/master/dir/file
f da39a3ee5e6b4b0d3255bfef95601890afd80709 .git/patches/master/dir/subdir/file
f da39a3ee5e6b4b0d3255bfef95601890afd80709 .git/patches/master/file
f da39a3ee5e6b4b0d3255bfef95601890afd80709 .git/patches/master/prepend
f da39a3ee5e6b4b0d3255bfef95601890afd80709 .git/patches/master/white space
% gult-new /abc
Patchname is invalid.
it cannot begin with '/', './' or '../', or contain /./ or /../
% list_files
d .git/patches
d .git/patches/master
d .git/patches/master/dir
d .git/patches/master/dir/subdir
f 22930c6d1f1938f298a4fca51c57e4b47171db21 .git/patches/master/mode
f 5be407ce965bd8f89a7ba3f9b3bdb4d80cf79f4c .git/patches/master/series
f 5d8322e2edfca0589cc24df9c09985a544591a2c .git/patches/master/add
f 8bdf2abdb045e63bb877890db12afcd5a2f023eb .git/patches/master/remove
f b29a8935ca88bce635ce3b6f42ea84eacca8af25 .git/patches/master/status
f bc9ab2e0f5db99d483961e956e814d963f0309f8 .git/patches/master/modify
f da39a3ee5e6b4b0d3255bfef95601890afd80709 .git/patches/master/append
f da39a3ee5e6b4b0d3255bfef95601890afd80709 .git/patches/master/dir/file
f da39a3ee5e6b4b0d3255bfef95601890afd80709 .git/patches/master/dir/subdir/file
f da39a3ee5e6b4b0d3255bfef95601890afd80709 .git/patches/master/file
f da39a3ee5e6b4b0d3255bfef95601890afd80709 .git/patches/master/prepend
f da39a3ee5e6b4b0d3255bfef95601890afd80709 .git/patches/master/white space
% gult-new ./blah
Patchname is invalid.
it cannot begin with '/', './' or '../', or contain /./ or /../
% list_files
d .git/patches
d .git/patches/master
d .git/patches/master/dir
d .git/patches/master/dir/subdir
f 22930c6d1f1938f298a4fca51c57e4b47171db21 .git/patches/master/mode
f 5be407ce965bd8f89a7ba3f9b3bdb4d80cf79f4c .git/patches/master/series
f 5d8322e2edfca0589cc24df9c09985a544591a2c .git/patches/master/add
f 8bdf2abdb045e63bb877890db12afcd5a2f023eb .git/patches/master/remove
f b29a8935ca88bce635ce3b6f42ea84eacca8af25 .git/patches/master/status
f bc9ab2e0f5db99d483961e956e814d963f0309f8 .git/patches/master/modify
f da39a3ee5e6b4b0d3255bfef95601890afd80709 .git/patches/master/append
f da39a3ee5e6b4b0d3255bfef95601890afd80709 .git/patches/master/dir/file
f da39a3ee5e6b4b0d3255bfef95601890afd80709 .git/patches/master/dir/subdir/file
f da39a3ee5e6b4b0d3255bfef95601890afd80709 .git/patches/master/file
f da39a3ee5e6b4b0d3255bfef95601890afd80709 .git/patches/master/prepend
f da39a3ee5e6b4b0d3255bfef95601890afd80709 .git/patches/master/white space
% gult-new ../blah
Patchname is invalid.
it cannot begin with '/', './' or '../', or contain /./ or /../
% list_files
d .git/patches
d .git/patches/master
d .git/patches/master/dir
d .git/patches/master/dir/subdir
f 22930c6d1f1938f298a4fca51c57e4b47171db21 .git/patches/master/mode
f 5be407ce965bd8f89a7ba3f9b3bdb4d80cf79f4c .git/patches/master/series
f 5d8322e2edfca0589cc24df9c09985a544591a2c .git/patches/master/add
f 8bdf2abdb045e63bb877890db12afcd5a2f023eb .git/patches/master/remove
f b29a8935ca88bce635ce3b6f42ea84eacca8af25 .git/patches/master/status
f bc9ab2e0f5db99d483961e956e814d963f0309f8 .git/patches/master/modify
f da39a3ee5e6b4b0d3255bfef95601890afd80709 .git/patches/master/append
f da39a3ee5e6b4b0d3255bfef95601890afd80709 .git/patches/master/dir/file
f da39a3ee5e6b4b0d3255bfef95601890afd80709 .git/patches/master/dir/subdir/file
f da39a3ee5e6b4b0d3255bfef95601890afd80709 .git/patches/master/file
f da39a3ee5e6b4b0d3255bfef95601890afd80709 .git/patches/master/prepend
f da39a3ee5e6b4b0d3255bfef95601890afd80709 .git/patches/master/white space
% gult-new abc/./blah
Patchname is invalid.
it cannot begin with '/', './' or '../', or contain /./ or /../
% list_files
d .git/patches
d .git/patches/master
d .git/patches/master/dir
d .git/patches/master/dir/subdir
f 22930c6d1f1938f298a4fca51c57e4b47171db21 .git/patches/master/mode
f 5be407ce965bd8f89a7ba3f9b3bdb4d80cf79f4c .git/patches/master/series
f 5d8322e2edfca0589cc24df9c09985a544591a2c .git/patches/master/add
f 8bdf2abdb045e63bb877890db12afcd5a2f023eb .git/patches/master/remove
f b29a8935ca88bce635ce3b6f42ea84eacca8af25 .git/patches/master/status
f bc9ab2e0f5db99d483961e956e814d963f0309f8 .git/patches/master/modify
f da39a3ee5e6b4b0d3255bfef95601890afd80709 .git/patches/master/append
f da39a3ee5e6b4b0d3255bfef95601890afd80709 .git/patches/master/dir/file
f da39a3ee5e6b4b0d3255bfef95601890afd80709 .git/patches/master/dir/subdir/file
f da39a3ee5e6b4b0d3255bfef95601890afd80709 .git/patches/master/file
f da39a3ee5e6b4b0d3255bfef95601890afd80709 .git/patches/master/prepend
f da39a3ee5e6b4b0d3255bfef95601890afd80709 .git/patches/master/white space
% gult-new abc/../blah
Patchname is invalid.
it cannot begin with '/', './' or '../', or contain /./ or /../
% list_files
d .git/patches
d .git/patches/master
d .git/patches/master/dir
d .git/patches/master/dir/subdir
f 22930c6d1f1938f298a4fca51c57e4b47171db21 .git/patches/master/mode
f 5be407ce965bd8f89a7ba3f9b3bdb4d80cf79f4c .git/patches/master/series
f 5d8322e2edfca0589cc24df9c09985a544591a2c .git/patches/master/add
f 8bdf2abdb045e63bb877890db12afcd5a2f023eb .git/patches/master/remove
f b29a8935ca88bce635ce3b6f42ea84eacca8af25 .git/patches/master/status
f bc9ab2e0f5db99d483961e956e814d963f0309f8 .git/patches/master/modify
f da39a3ee5e6b4b0d3255bfef95601890afd80709 .git/patches/master/append
f da39a3ee5e6b4b0d3255bfef95601890afd80709 .git/patches/master/dir/file
f da39a3ee5e6b4b0d3255bfef95601890afd80709 .git/patches/master/dir/subdir/file
f da39a3ee5e6b4b0d3255bfef95601890afd80709 .git/patches/master/file
f da39a3ee5e6b4b0d3255bfef95601890afd80709 .git/patches/master/prepend
f da39a3ee5e6b4b0d3255bfef95601890afd80709 .git/patches/master/white space
% gult-new abc/.
Patchname is invalid.
it cannot begin with '/', './' or '../', or contain /./ or /../
% list_files
d .git/patches
d .git/patches/master
d .git/patches/master/dir
d .git/patches/master/dir/subdir
f 22930c6d1f1938f298a4fca51c57e4b47171db21 .git/patches/master/mode
f 5be407ce965bd8f89a7ba3f9b3bdb4d80cf79f4c .git/patches/master/series
f 5d8322e2edfca0589cc24df9c09985a544591a2c .git/patches/master/add
f 8bdf2abdb045e63bb877890db12afcd5a2f023eb .git/patches/master/remove
f b29a8935ca88bce635ce3b6f42ea84eacca8af25 .git/patches/master/status
f bc9ab2e0f5db99d483961e956e814d963f0309f8 .git/patches/master/modify
f da39a3ee5e6b4b0d3255bfef95601890afd80709 .git/patches/master/append
f da39a3ee5e6b4b0d3255bfef95601890afd80709 .git/patches/master/dir/file
f da39a3ee5e6b4b0d3255bfef95601890afd80709 .git/patches/master/dir/subdir/file
f da39a3ee5e6b4b0d3255bfef95601890afd80709 .git/patches/master/file
f da39a3ee5e6b4b0d3255bfef95601890afd80709 .git/patches/master/prepend
f da39a3ee5e6b4b0d3255bfef95601890afd80709 .git/patches/master/white space
% gult-new abc/..
Patchname is invalid.
it cannot begin with '/', './' or '../', or contain /./ or /../
% list_files
d .git/patches
d .git/patches/master
d .git/patches/master/dir
d .git/patches/master/dir/subdir
f 22930c6d1f1938f298a4fca51c57e4b47171db21 .git/patches/master/mode
f 5be407ce965bd8f89a7ba3f9b3bdb4d80cf79f4c .git/patches/master/series
f 5d8322e2edfca0589cc24df9c09985a544591a2c .git/patches/master/add
f 8bdf2abdb045e63bb877890db12afcd5a2f023eb .git/patches/master/remove
f b29a8935ca88bce635ce3b6f42ea84eacca8af25 .git/patches/master/status
f bc9ab2e0f5db99d483961e956e814d963f0309f8 .git/patches/master/modify
f da39a3ee5e6b4b0d3255bfef95601890afd80709 .git/patches/master/append
f da39a3ee5e6b4b0d3255bfef95601890afd80709 .git/patches/master/dir/file
f da39a3ee5e6b4b0d3255bfef95601890afd80709 .git/patches/master/dir/subdir/file
f da39a3ee5e6b4b0d3255bfef95601890afd80709 .git/patches/master/file
f da39a3ee5e6b4b0d3255bfef95601890afd80709 .git/patches/master/prepend
f da39a3ee5e6b4b0d3255bfef95601890afd80709 .git/patches/master/white space
% gult-new abc/
Patchname is invalid.
it cannot begin with '/', './' or '../', or contain /./ or /../
% list_files
d .git/patches
d .git/patches/master
d .git/patches/master/dir
d .git/patches/master/dir/subdir
f 22930c6d1f1938f298a4fca51c57e4b47171db21 .git/patches/master/mode
f 5be407ce965bd8f89a7ba3f9b3bdb4d80cf79f4c .git/patches/master/series
f 5d8322e2edfca0589cc24df9c09985a544591a2c .git/patches/master/add
f 8bdf2abdb045e63bb877890db12afcd5a2f023eb .git/patches/master/remove
f b29a8935ca88bce635ce3b6f42ea84eacca8af25 .git/patches/master/status
f bc9ab2e0f5db99d483961e956e814d963f0309f8 .git/patches/master/modify
f da39a3ee5e6b4b0d3255bfef95601890afd80709 .git/patches/master/append
f da39a3ee5e6b4b0d3255bfef95601890afd80709 .git/patches/master/dir/file
f da39a3ee5e6b4b0d3255bfef95601890afd80709 .git/patches/master/dir/subdir/file
f da39a3ee5e6b4b0d3255bfef95601890afd80709 .git/patches/master/file
f da39a3ee5e6b4b0d3255bfef95601890afd80709 .git/patches/master/prepend
f da39a3ee5e6b4b0d3255bfef95601890afd80709 .git/patches/master/white space
66 changes: 66 additions & 0 deletions regression/t-025.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
#!/bin/bash
#
# Test the new code
#

source $REG_DIR/scaffold

begin "setup_repo"
setup_repo

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

for pname in file dir/file dir/subdir/file ; do
begin "guilt-new $pname"
guilt-new "$pname"
guilt-pop 2>&1
fixup_time_info "$pname"
guilt-push 2>&1

begin "list_files"
list_files
done

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

begin "guilt-new append"
guilt-new append
guilt-pop 2>&1
fixup_time_info append
guilt-push 2>&1

begin "list_files"
list_files

begin "guilt-pop --all"
guilt-pop --all 2>&1

begin "guilt-new prepend"
guilt-new prepend
guilt-pop 2>&1
fixup_time_info prepend
guilt-push 2>&1

begin "list_files"
list_files

begin "guilt-new \"white space\""
guilt-new "white space"
guilt-pop 2>&1
fixup_time_info "white space"
guilt-push 2>&1

begin "list_files"
list_files

for pname in prepend mode /abc ./blah ../blah abc/./blah abc/../blah abc/. abc/.. abc/ ; do
begin "gult-new $pname"
shouldfail guilt-new "$pname" 2>&1

begin "list_files"
list_files
done

0 comments on commit f192bc8

Please sign in to comment.