Commit 33e3a1a3 authored by BenceJanosSzabo's avatar BenceJanosSzabo
Browse files

Added -J flag to xsd2ttcn for uniform 'read from file' flag in TITAN



Change-Id: Ib1ed4e2390a3538bd19413dd5eca1220c01fb18e
Signed-off-by: default avatarBenceJanosSzabo <bence.janos.szabo@ericsson.com>
parent 2417b71c
......@@ -231,6 +231,15 @@ testcase tc_options_f() runs on xmlTest_CT
}
}
// -J file: the XSD files are taken from file instead of the command line
testcase tc_options_J() runs on xmlTest_CT
{
f_shellCommandWithVerdict(xsd2ttcn_command & " -J XmlTest_files1.txt","",c_shell_successWithWarning );
if(getverdict==pass) {
f_compareFiles("www_XmlTest_org_annotation2_e.ttcn","www_XmlTest_org_annotation.ttcn", c_numOfDiff_ModName);
}
}
testcase tc_options_g() runs on xmlTest_CT
{
f_shellCommandWithVerdict(xsd2ttcn_command & " -g dont_generate_element_substitution.xsd","",c_shell_successWithoutWarningAndError );
......@@ -2511,6 +2520,7 @@ control {
execute(tc_options_c());
execute(tc_options_e());
execute(tc_options_f());
execute(tc_options_J());
execute(tc_options_g());
execute(tc_options_p());
execute(tc_options_s());
......
......@@ -31,7 +31,7 @@
bool c_flag_used = false;
int d_flag_used = 0;
bool e_flag_used = false;
bool f_flag_used = false;
bool f_flag_used = false; // also J flag
bool g_flag_used = true;
bool h_flag_used = false;
bool m_flag_used = false;
......@@ -72,7 +72,7 @@ int main(int argc, char **argv) {
char c;
opterr = 0;
while ((c = getopt(argc, argv, "cdef:ghmnpqstvwxz")) != -1) {
while ((c = getopt(argc, argv, "cdef:ghJ:mnpqstvwxz")) != -1) {
switch (c) {
case 'c':
c_flag_used = true;
......@@ -84,6 +84,7 @@ int main(int argc, char **argv) {
e_flag_used = true;
break;
case 'f':
case 'J':
f_flag_used = true;
from_file = optarg;
break;
......@@ -241,13 +242,13 @@ static void printProductinfo() {
static void printUsage(const char * argv0) {
fprintf(stderr, "\n"
"usage: %s [-ceghmpstVwx] [-f file] schema.xsd ...\n"
"usage: %s [-ceghmpstVwx] [-f file] [-J file] schema.xsd ...\n"
" or %s -v\n"
"\n"
"OPTIONS:\n"
" -c: disable the generation of comments in TTCN-3 modules\n"
" -e: disable the generation of encoding instructions in TTCN-3 modules\n"
" -f file: the names of XSD files are taken from file instead of the command line\n"
" -f|J file: the names of XSD files are taken from file instead of the command line\n"
" -g: generate TTCN-3 code disallowing element substitution\n"
" -h: generate TTCN-3 code allowing type substitution\n"
" -m: generate only the UsefulTtcn3Types and XSD predefined modules"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment