]> git.madduck.net Git - code/vcsh.git/blob - t/100-init.t

madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://git.madduck.net/madduck/pub/<projectpath> — see each project's metadata for the exact URL.

All patches and comments are welcome. Please squash your changes to logical commits before using git-format-patch and git-send-email to patches@git.madduck.net. If you'd read over the Git project's submission guidelines and adhered to them, I'd be especially grateful.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://git.madduck.net/madduck/"]
  insteadOf = madduck:

Merge pull request #149 from dottedmag/fix-test-git-22
[code/vcsh.git] / t / 100-init.t
1 #!/usr/bin/perl
2
3 use strict;
4 use warnings;
5
6 use Cwd 'abs_path';
7 use Test::Most;
8
9 chdir 't/etc/' or die $!;
10
11 $ENV{'HOME'} = abs_path ('.vcsh_home');
12
13 my $output = `./vcsh status`;
14
15 ok $output eq "", 'No repos set up yet.';
16
17 $output = `LC_ALL=C ./vcsh init test1`;
18
19 ok $output eq "Initialized empty shared Git repository in " . $ENV{'HOME'} . "/.config/vcsh/repo.d/test1.git/\n";
20
21 $output = `./vcsh status`;
22
23 ok $output eq "test1:\n\n", 'Our new repo is there';
24
25 chdir $ENV{"HOME"} . '/.config/vcsh/repo.d/test1.git/' or die $!;
26
27 ok -f 'HEAD';
28 ok -f 'config';
29 ok -f 'description';
30 ok -d 'hooks';
31 ok -d 'info';
32 ok -d 'objects';
33 ok -d 'refs';
34
35 ok -f 'hooks/applypatch-msg.sample';
36 ok -f 'hooks/commit-msg.sample';
37 ok -f 'hooks/post-update.sample';
38 ok -f 'hooks/pre-applypatch.sample';
39 ok -f 'hooks/pre-commit.sample';
40 ok -f 'hooks/pre-push.sample';
41 ok -f 'hooks/pre-rebase.sample';
42 ok -f 'hooks/prepare-commit-msg.sample';
43 ok -f 'hooks/update.sample';
44
45 ok -f 'info/exclude';
46
47 ok -d 'objects/info';
48 ok -d 'objects/pack';
49
50 ok -d 'refs/heads';
51 ok -d 'refs/tags';
52
53 done_testing;