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