Skip to content
300-add.t 380 B
Newer Older
Errietta Kostala's avatar
Errietta Kostala committed
#!/usr/bin/perl

use strict;
use warnings;

use Cwd 'abs_path';

use Shell::Command;
use Test::Most;

chdir 't/etc/' or die $!;

$ENV{'HOME'} = abs_path ('.vcsh_home');

Richard Hartmann's avatar
Richard Hartmann committed
chdir '.vcsh_home' or die $!;

Errietta Kostala's avatar
Errietta Kostala committed
eval {
	touch 'a';
};

die $@ if $@;

Richard Hartmann's avatar
Richard Hartmann committed
system (".././vcsh test1 add 'a'");
Errietta Kostala's avatar
Errietta Kostala committed

Richard Hartmann's avatar
Richard Hartmann committed
my $output = `.././vcsh status`;
Errietta Kostala's avatar
Errietta Kostala committed

ok $output eq "test1:
Richard Hartmann's avatar
Richard Hartmann committed
A  a

", 'Adding a file works';
Errietta Kostala's avatar
Errietta Kostala committed

done_testing;