Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

[GH #902] Support multiple paths in PARROT_LIBRARY, PARROT_INCLUDE

Fixed conflict:
	t/library/lib_search_path.t
  • Loading branch information...
commit bf57e28c5f7f2870ebfe2b1666b9552649948149 1 parent fa14122
@rurban rurban authored
Showing with 7 additions and 6 deletions.
  1. +2 −2 src/library.c
  2. +5 −4 t/library/lib_search_path.t
View
4 src/library.c
@@ -164,7 +164,7 @@ parrot_init_library_paths(PARROT_INTERP)
STRING *envvar = Parrot_getenv(interp, CONST_STRING(interp, "PARROT_INCLUDE"));
Parrot_warn_experimental(interp, "PARROT_INCLUDE environment variable is experimental");
if (!STRING_IS_NULL(envvar) && !STRING_IS_EMPTY(envvar))
- VTABLE_push_string(interp, paths, envvar);
+ add_env_paths(interp, paths, envvar);
}
/* define library paths */
@@ -175,7 +175,7 @@ parrot_init_library_paths(PARROT_INTERP)
STRING *envvar = Parrot_getenv(interp, CONST_STRING(interp, "PARROT_LIBRARY"));
Parrot_warn_experimental(interp, "PARROT_LIBRARY environment variable is experimental");
if (!STRING_IS_NULL(envvar) && !STRING_IS_EMPTY(envvar))
- VTABLE_push_string(interp, paths, envvar);
+ add_env_paths(interp, paths, envvar);
}
/* define languages paths */
View
9 t/library/lib_search_path.t
@@ -1,5 +1,5 @@
#!perl
-# Copyright (C) 2011-2012, Parrot Foundation.
+# Copyright (C) 2011-2013, Parrot Foundation.
use strict;
use warnings;
@@ -63,7 +63,7 @@ no duplicates
=cut
my $sep = $^O eq 'MSWin32' ? ';' : ':';
-local $ENV{PARROT_LIBRARY} = 'libenvdir';
+local $ENV{PARROT_LIBRARY} = "libenvdir$sep/lib2:";
local $ENV{PARROT_INCLUDE} = 'incenvdir';
local $ENV{PARROT_DYNEXT} = "/dynenvdir1$sep/dynenvdir2";
@@ -135,7 +135,8 @@ my $library = $code;
$library =~ s/DYNEXT/LIBRARY/;
$library = Parrot::Test::_pir_stdin_output_slurp('', $library);
$expected =
-"libenvdir
+"libenvdir/
+/lib2/
$builddir/runtime/parrot/library/
$versionlib/library/
./
@@ -146,7 +147,7 @@ my $include = $code;
$include =~ s/DYNEXT/INCLUDE/;
$include = Parrot::Test::_pir_stdin_output_slurp('', $include);
$expected =
-"incenvdir
+"incenvdir/
$builddir/
$builddir/runtime/parrot/include/
$versionlib/include/
Please sign in to comment.
Something went wrong with that request. Please try again.