Test_tree_SOURCES = Test_tree.c
Test_tree_LDADD = ../lib/libtasn1.la
+
+TESTS_ENVIRONMENT = \
+ ASN1PARSER=$(srcdir)/Test_parser.asn \
+ ASN1TREE=$(srcdir)/Test_tree.asn
/*
* Copyright (C) 2002 Fabio Fiorina
+ * Copyright (C) 2006 Simon Josefsson
*
* This file is part of LIBTASN1.
*
char *errorDescription;
} test_type;
-char fileCorrectName[]="Test_parser.asn";
+char *fileCorrectName;
char fileErroredName[]="Test_parser_ERROR.asn";
#define _FILE_ "Test_parser_ERROR.asn"
test_type *test;
int errorCounter=0,testCounter=0;
+ fileCorrectName = getenv ("ASN1PARSER");
+ if (!fileCorrectName)
+ fileCorrectName="Test_parser.asn";
+
printf("\n\n/****************************************/\n");
printf( "/* Test sequence : Test_parser */\n");
printf( "/****************************************/\n\n");
-
+ printf("ASN1PARSER: %s\n", fileCorrectName);
result=asn1_parser2tree(fileCorrectName,&definitions,errorDescription);
/*
* Copyright (C) 2002 Fabio Fiorina
+ * Copyright (C) 2006 Simon Josefsson
*
* This file is part of LIBTASN1.
*
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);