diff --git a/ase/test/awk/awk.c b/ase/test/awk/awk.c index fea6c9ea..79919314 100644 --- a/ase/test/awk/awk.c +++ b/ase/test/awk/awk.c @@ -1,5 +1,5 @@ /* - * $Id: awk.c,v 1.181 2007-03-02 14:42:04 bacon Exp $ + * $Id: awk.c,v 1.182 2007-03-04 06:39:13 bacon Exp $ */ #include @@ -688,8 +688,8 @@ static void on_run_end (ase_awk_run_t* run, int errnum, void* custom_data) { if (errnum != ASE_AWK_ENOERR) { - dprintf (ASE_T("[AWK ENDED WITH AN ERROR] - ")); - dprintf (ASE_T("CODE [%d] LINE [%u] %s\n"), + dprintf (ASE_T("[AWK ENDED WITH AN ERROR]\n")); + ase_printf (ASE_T("RUN ERROR: CODE [%d] LINE [%u] %s\n"), errnum, (unsigned int)ase_awk_getrunerrlin(run), ase_awk_getrunerrmsg(run)); @@ -892,11 +892,11 @@ static int awk_main (int argc, ase_char_t* argv[]) if (ase_awk_parse (awk, &srcios) == -1) { - int errnum = ase_awk_geterrnum(awk); ase_printf ( - ASE_T("ERROR: cannot parse program - line %u [%d] %s\n"), + ASE_T("PARSE ERROR: CODE [%d] LINE [%u] %s\n"), + ase_awk_geterrnum(awk), (unsigned int)ase_awk_geterrlin(awk), - errnum, ase_awk_geterrmsg(awk)); + ase_awk_geterrmsg(awk)); ase_awk_close (awk); return -1; } diff --git a/ase/test/awk/err-001.out b/ase/test/awk/err-001.out index 8b4c838b..d88653da 100644 --- a/ase/test/awk/err-001.out +++ b/ase/test/awk/err-001.out @@ -1 +1 @@ -ERROR: cannot parse program - line 2 [35] invalid character ' +PARSE ERROR: CODE [36] LINE [2] invalid character ' diff --git a/ase/test/awk/err-002.out b/ase/test/awk/err-002.out new file mode 100644 index 00000000..eadc4818 --- /dev/null +++ b/ase/test/awk/err-002.out @@ -0,0 +1,4 @@ +BEGIN { + ARGC = 39; +} + diff --git a/ase/test/awk/err-003.out b/ase/test/awk/err-003.out new file mode 100644 index 00000000..313c6b50 --- /dev/null +++ b/ase/test/awk/err-003.out @@ -0,0 +1,8 @@ +global abc; + +BEGIN { + abc[20] = "abc"; + abc = 10; +} + +RUN ERROR: CODE [91] LINE [5] map 'abc' not assignable with a scalar diff --git a/ase/test/awk/err-004.out b/ase/test/awk/err-004.out new file mode 100644 index 00000000..ddf848d4 --- /dev/null +++ b/ase/test/awk/err-004.out @@ -0,0 +1,5 @@ +BEGIN { + delete ARGC; +} + +RUN ERROR: CODE [85] LINE [2] variable 'ARGC' not deletable diff --git a/ase/test/awk/err-005.out b/ase/test/awk/err-005.out new file mode 100644 index 00000000..b72d851e --- /dev/null +++ b/ase/test/awk/err-005.out @@ -0,0 +1,6 @@ +BEGIN { + iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiix = 20; + delete iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiix; +} + +RUN ERROR: CODE [85] LINE [3] variable 'iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii...' not deletable diff --git a/ase/test/awk/err-006.out b/ase/test/awk/err-006.out new file mode 100644 index 00000000..1d5d305b --- /dev/null +++ b/ase/test/awk/err-006.out @@ -0,0 +1,5 @@ +BEGIN { + helpxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxhelphelp (); +} + +RUN ERROR: CODE [83] LINE [2] function 'helpxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxhel...' not found diff --git a/ase/test/awk/err-007.out b/ase/test/awk/err-007.out new file mode 100644 index 00000000..8dc0c810 --- /dev/null +++ b/ase/test/awk/err-007.out @@ -0,0 +1 @@ +PARSE ERROR: CODE [60] LINE [2] built-in function 'substr' redefined diff --git a/ase/test/awk/err-008.out b/ase/test/awk/err-008.out new file mode 100644 index 00000000..82de052b --- /dev/null +++ b/ase/test/awk/err-008.out @@ -0,0 +1 @@ +PARSE ERROR: CODE [60] LINE [3] built-in function 'substr' redefined diff --git a/ase/test/awk/err-009.out b/ase/test/awk/err-009.out new file mode 100644 index 00000000..380c7232 --- /dev/null +++ b/ase/test/awk/err-009.out @@ -0,0 +1 @@ +PARSE ERROR: CODE [61] LINE [9] function 'abc' redefined diff --git a/ase/test/awk/err-010.out b/ase/test/awk/err-010.out new file mode 100644 index 00000000..cb4cc63c --- /dev/null +++ b/ase/test/awk/err-010.out @@ -0,0 +1 @@ +PARSE ERROR: CODE [62] LINE [4] global variable 'abc' redefined diff --git a/ase/test/awk/err-011.out b/ase/test/awk/err-011.out new file mode 100644 index 00000000..426df131 --- /dev/null +++ b/ase/test/awk/err-011.out @@ -0,0 +1 @@ +PARSE ERROR: CODE [63] LINE [4] parameter 'x' redefined diff --git a/ase/test/awk/err-012.out b/ase/test/awk/err-012.out new file mode 100644 index 00000000..ce8b91f9 --- /dev/null +++ b/ase/test/awk/err-012.out @@ -0,0 +1 @@ +PARSE ERROR: CODE [61] LINE [11] function 'abc' redefined diff --git a/ase/test/awk/err-013.out b/ase/test/awk/err-013.out new file mode 100644 index 00000000..e0e9f386 --- /dev/null +++ b/ase/test/awk/err-013.out @@ -0,0 +1 @@ +PARSE ERROR: CODE [61] LINE [1] function 'abc' redefined