diff: string__format bug fix
Fergus Henderson
fjh at cs.mu.OZ.AU
Wed Oct 28 19:55:23 AEDT 1998
On 28-Oct-1998, Fergus Henderson <fjh at cs.mu.OZ.AU> wrote:
> library/string.m:
> Fix a bug in string__format: it was not reporting an error
> in the case where the argument list had more elements
> than was appropriate for the format string.
>
> tests/general/Mmakefile:
> tests/general/string_format_test_2.m:
> tests/general/string_format_test_2.exp:
> tests/general/string_format_test_3.m:
> tests/general/string_format_test_3.exp:
> Test cases for the above-mentioned bug fix.
Oops, it turns out that this change actually broke the existing
test case tests/general/string_format_test.m.
--------------------
tests/general/string_format_test.m:
Fix a number of places where there were the wrong
number of arguments in the list passed to string__format.
These needed to be fixed now that string__format is
more picky about rejecting those sort of errors.
Index: tests/general/string_format_test.m
===================================================================
RCS file: /home/mercury1/repository/tests/general/string_format_test.m,v
retrieving revision 1.1
diff -u -r1.1 string_format_test.m
--- string_format_test.m 1998/03/03 17:47:22 1.1
+++ string_format_test.m 1998/10/28 08:52:54
@@ -44,17 +44,13 @@
{ Num_1 = i(-31) },
{ Num_2 = i(31) },
{ string__format( F_string0, [Num_1, Num_1, Num_1, Num_1], String_5) },
- { string__format( F_string0, [Num_2, Num_2, Num_2, Num_2, Num_2, Num_2,
- Num_2, Num_2, Num_2, Num_2], String_6) },
+ { string__format( F_string0, [Num_2, Num_2, Num_2, Num_2], String_6) },
{ string__format( F_string1, [Num_1, Num_1, Num_1, Num_1], String_7) },
- { string__format( F_string1, [Num_2, Num_2, Num_2, Num_2, Num_2, Num_2,
- Num_2, Num_2, Num_2, Num_2], String_8) },
+ { string__format( F_string1, [Num_2, Num_2, Num_2, Num_2], String_8) },
{ string__format( F_string2, [Num_1, Num_1, Num_1, Num_1], String_9) },
- { string__format( F_string2, [Num_2, Num_2, Num_2, Num_2, Num_2, Num_2,
- Num_2, Num_2, Num_2, Num_2], String_10) },
+ { string__format( F_string2, [Num_2, Num_2, Num_2, Num_2], String_10) },
{ string__format( F_string3, [Num_1, Num_1, Num_1, Num_1], String_11) },
- { string__format( F_string3, [Num_2, Num_2, Num_2, Num_2, Num_2, Num_2,
- Num_2, Num_2, Num_2, Num_2], String_12) },
+ { string__format( F_string3, [Num_2, Num_2, Num_2, Num_2], String_12) },
[],
[],
io__write_string("\n"),
--
Fergus Henderson <fjh at cs.mu.oz.au> | "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh> | of excellence is a lethal habit"
PGP: finger fjh at 128.250.37.3 | -- the last words of T. S. Garp.
More information about the developers
mailing list