From fbac6dd1760b19e7aca0bd33c949d5f38a164840 Mon Sep 17 00:00:00 2001 From: Simon Josefsson Date: Fri, 27 Jan 2006 12:25:51 +0000 Subject: Fix make check for objdir != srcdir, reported by Bernard Leak . --- tests/Test_tree.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'tests/Test_tree.c') diff --git a/tests/Test_tree.c b/tests/Test_tree.c index 7cdd068..fccbc36 100644 --- a/tests/Test_tree.c +++ b/tests/Test_tree.c @@ -1,5 +1,6 @@ /* * Copyright (C) 2002 Fabio Fiorina + * Copyright (C) 2006 Simon Josefsson * * This file is part of LIBTASN1. * @@ -415,17 +416,22 @@ main(int argc,char *argv[]) int k; int start,end; const char *str_p=NULL; + const char *treefile = getenv ("ASN1TREE"); + + if (!treefile) + treefile = "Test_tree.asn"; printf("\n\n/****************************************/\n"); printf( "/* Test sequence : Test_tree */\n"); printf( "/****************************************/\n\n"); + printf("ASN1TREE: %s\n", treefile); /* Check version */ if(asn1_check_version("0.2.11")==NULL) printf("\nLibrary version check ERROR:\n actual version: %s\n\n",asn1_check_version(NULL)); if(1) - result=asn1_parser2tree("Test_tree.asn",&definitions,errorDescription); + result=asn1_parser2tree(treefile,&definitions,errorDescription); else result=asn1_array2tree(Test_tree_asn1_tab,&definitions,errorDescription); -- cgit v1.2.3