forked from acme/git-pureperl
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path00_setup.t
45 lines (37 loc) · 1 KB
/
00_setup.t
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#!perl
use strict;
use warnings;
use Test::More;
use Archive::Extract;
foreach my $name (qw(test-project test-project-packs test-project-packs2 test-encoding test-util)) {
next if -d $name;
my $ae = Archive::Extract->new( archive => "$name.tgz" );
$ae->extract;
}
ok(1, 'extracted');
done_testing;
=for shell
# How to create test-project and test-project-packs:
mkdir test-project
cd test-project
git init
git config user.name "Your Name Comes Here"
git config user.email [email protected]
echo 'hello world' > file.txt
git add .
git commit -a -m "initial commit"
echo 'hello world!' >file.txt
git commit -a -m "add emphasis"
echo "hello world, again" >>file.txt
git commit -a -m "add again"
cd ..
tar fvzc test-project.tgz test-project
cd test-project
git gc
cd ..
mv test-project test-project-packs
tar fvzc test-project-packs.tgz test-project-packs
rm -rf test-project-packs
# and likewise but on a recent git for test-project-packs2
tar fvzc test-project-packs2.tgz test-project-packs2
=cut