Files
mercury/tests/hard_coded/join_list.exp
Zoltan Somogyi 28a5a9dad0 Fix a bug in string__join_list pointed out by Fergus; the length
Estimated hours taken: 1
Branches: main

library/string.m:
	Fix a bug in string__join_list pointed out by Fergus; the length
	calculation and the string copying now use the same logic.

library/tests/hard_coded/join_list.{m,exp}:
	A new test case to exercise string__join_list.

library/tests/hard_coded/Mmakefile:
	Enable the new test.
2001-08-01 00:31:41 +00:00

37 lines
666 B
Plaintext

a, b
a b
a x b
ab
a, b, c
a b c
a x b x c
abc
a, , c
a c
a x x c
ac
abc, def, ghi
abc def ghi
abc x def x ghi
abcdefghi
the, quick, brown, fox, jumped, over, the, lazy, dog
the quick brown fox jumped over the lazy dog
the x quick x brown x fox x jumped x over x the x lazy x dog
thequickbrownfoxjumpedoverthelazydog
this, is, a, test, to, check, the correctness, of the, join_list , predicate
this is a test to check the correctness of the join_list predicate
this x is x a x test x to x check x the correctness x of the x join_list x predicate
thisisatesttocheckthe correctness of thejoin_list predicate
, , , x
x
x x x x
x