commit a9b6c5a848ffc8f6380c8946f6677c4b72374c7c
parent 4fd406fec00811632d58913d125d8826b1a451b9
Author: Kyle Milz <kyle@0x30.net>
Date: Mon, 2 Jan 2017 18:41:36 -0700
t: adjust tests for binary moves
Diffstat:
18 files changed, 18 insertions(+), 18 deletions(-)
diff --git a/t/check_baddir.t b/t/check_baddir.t
@@ -12,7 +12,7 @@ my $output_good = "Summary:
my $error_good = "find: _nonexistent_: No such file or directory
";
-my $check = Test::Cmd->new( prog => 'src/citrun_check', workdir => '' );
+my $check = Test::Cmd->new( prog => 'citrun_check', workdir => '' );
$check->run( args => '_nonexistent_', chdir => $check->curdir );
is( $check->stdout, $output_good, 'is citrun_check stdout identical' );
diff --git a/t/check_empty.t b/t/check_empty.t
@@ -10,7 +10,7 @@ my $output_good = "Summary:
0 Source files used as input
";
-my $check = Test::Cmd->new( prog => 'src/citrun_check', workdir => '' );
+my $check = Test::Cmd->new( prog => 'citrun_check', workdir => '' );
$check->run( chdir => $check->curdir );
is( $check->stdout, $output_good, 'is citrun_check stdout identical' );
diff --git a/t/inst_binop.t b/t/inst_binop.t
@@ -9,7 +9,7 @@ use Test::More tests => 4;
unified_diff; # for Test::Differences
-my $inst = Test::Cmd->new( prog => 'src/citrun_inst', workdir => '' );
+my $inst = Test::Cmd->new( prog => 'citrun_inst', workdir => '' );
$inst->write( 'binop.c', <<EOF );
enum ASDF {
ONE = (1 << 0),
diff --git a/t/inst_dowhile.t b/t/inst_dowhile.t
@@ -9,7 +9,7 @@ use Test::More tests => 4;
unified_diff; # for Test::Differences
-my $inst = Test::Cmd->new( prog => 'src/citrun_inst', workdir => '' );
+my $inst = Test::Cmd->new( prog => 'citrun_inst', workdir => '' );
$inst->write( 'dowhile.c', <<EOF );
int main(int argc, char *argv[]) {
do {
diff --git a/t/inst_for.t b/t/inst_for.t
@@ -9,7 +9,7 @@ use Test::More tests => 4;
unified_diff; # for Test::Differences
-my $inst = Test::Cmd->new( prog => 'src/citrun_inst', workdir => '' );
+my $inst = Test::Cmd->new( prog => 'citrun_inst', workdir => '' );
$inst->write( 'for.c', <<EOF );
int main(int argc, char *argv[]) {
for (;;);
diff --git a/t/inst_funcdef.t b/t/inst_funcdef.t
@@ -9,7 +9,7 @@ use Test::More tests => 4;
unified_diff; # for Test::Differences
-my $inst = Test::Cmd->new( prog => 'src/citrun_inst', workdir => '' );
+my $inst = Test::Cmd->new( prog => 'citrun_inst', workdir => '' );
$inst->write( 'funcdef.c', <<EOF );
void
diff --git a/t/inst_if.t b/t/inst_if.t
@@ -9,7 +9,7 @@ use Test::More tests => 4;
unified_diff; # for Test::Differences
-my $inst = Test::Cmd->new( prog => 'src/citrun_inst', workdir => '' );
+my $inst = Test::Cmd->new( prog => 'citrun_inst', workdir => '' );
$inst->write( 'if.c', <<EOF );
int main(int argc, char *argv[]) {
if (argc == 1)
diff --git a/t/inst_log.t b/t/inst_log.t
@@ -10,7 +10,7 @@ use Test::More tests => 3;
unified_diff; # for Test::Differences
-my $wrap = Test::Cmd->new( prog => 'src/citrun_wrap', workdir => '' );
+my $wrap = Test::Cmd->new( prog => 'citrun_wrap', workdir => '' );
$wrap->write( 'main.c', <<EOF );
#include <stdlib.h>
diff --git a/t/inst_macro.t b/t/inst_macro.t
@@ -10,7 +10,7 @@ use Test::More tests => 4;
unified_diff; # for Test::Differences
-my $inst = Test::Cmd->new( prog => 'src/citrun_inst', workdir => '' );
+my $inst = Test::Cmd->new( prog => 'citrun_inst', workdir => '' );
$inst->write( 'macro.c', <<EOF );
#define MAYBE 1023;
diff --git a/t/inst_path.t b/t/inst_path.t
@@ -8,7 +8,7 @@ use warnings;
use Test::Cmd;
use Test::More tests => 6;
-my $cc = Test::Cmd->new( prog => 'src/cc', workdir => '' );
+my $cc = Test::Cmd->new( prog => 'cc', workdir => '' );
delete $ENV{'PATH'};
$cc->run( args => "-c nomatter.c", chdir => $cc->curdir );
diff --git a/t/inst_preamble.t b/t/inst_preamble.t
@@ -10,7 +10,7 @@ use Test::More tests => 3;
unified_diff;
-my $inst = Test::Cmd->new( prog => 'src/citrun_inst', workdir => '' );
+my $inst = Test::Cmd->new( prog => 'citrun_inst', workdir => '' );
$inst->write( "empty.c", "" );
$inst->run( args => "-c empty.c", chdir => $inst->curdir );
diff --git a/t/inst_preprocess.t b/t/inst_preprocess.t
@@ -10,7 +10,7 @@ unified_diff; # for Test::Differences
my $preproc = 'int main(void) { return 0; }';
-my $inst = Test::Cmd->new( prog => 'src/citrun_inst', workdir => '' );
+my $inst = Test::Cmd->new( prog => 'citrun_inst', workdir => '' );
$inst->write( 'prepro.c', $preproc );
# Test -E
diff --git a/t/inst_return.t b/t/inst_return.t
@@ -9,7 +9,7 @@ use Test::More tests => 4;
unified_diff; # for Test::Differences
-my $inst = Test::Cmd->new( prog => 'src/citrun_inst', workdir => '' );
+my $inst = Test::Cmd->new( prog => 'citrun_inst', workdir => '' );
$inst->write( 'return.c', <<EOF );
int foo() {
return 0;
diff --git a/t/inst_switch.t b/t/inst_switch.t
@@ -9,7 +9,7 @@ use Test::More tests => 4;
unified_diff; # for Test::Differences
-my $inst = Test::Cmd->new( prog => 'src/citrun_inst', workdir => '' );
+my $inst = Test::Cmd->new( prog => 'citrun_inst', workdir => '' );
$inst->write( 'switch.c', <<EOF );
int main(void)
{
diff --git a/t/inst_while.t b/t/inst_while.t
@@ -9,7 +9,7 @@ use Test::More tests => 4;
unified_diff; # for Test::Differences
-my $inst = Test::Cmd->new( prog => 'src/citrun_inst', workdir => '' );
+my $inst = Test::Cmd->new( prog => 'citrun_inst', workdir => '' );
$inst->write( 'while.c', <<EOF );
int main(int argc, char *argv[]) {
while (argc < 17)
diff --git a/t/utils.pm b/t/utils.pm
@@ -10,7 +10,7 @@ sub new {
my $tmp_dir = tempdir( CLEANUP => 1 );
$ENV{CITRUN_PROCDIR} = "$tmp_dir/procdir/";
- $ENV{PATH} = getcwd . "/src:" . $ENV{PATH};
+ $ENV{PATH} = getcwd . ":$ENV{PATH}";
copy($_, $tmp_dir) while (<t/program/*>);
system("make -C $tmp_dir");
diff --git a/t/utils.subr b/t/utils.subr
@@ -1,7 +1,7 @@
. t/libtap.subr
treedir=`pwd`
-export PATH="$treedir/src:${PATH}"
+export PATH="$treedir:${PATH}"
export CITRUN_PROCDIR="procdir/"
tmpdir=`mktemp -d /tmp/citrun.XXXXXXXXXX` || exit 1
diff --git a/t/wrap_exitcode.t b/t/wrap_exitcode.t
@@ -6,7 +6,7 @@ use warnings;
use Test::Cmd;
use Test::More tests => 3;
-my $wrap = Test::Cmd->new( prog => 'src/citrun_wrap', workdir => '' );
+my $wrap = Test::Cmd->new( prog => 'citrun_wrap', workdir => '' );
if ($^O eq "MSWin32") {
my $err_good = "Cannot access file C:\\Users\\kyle\\citrun\\asdf