english
version "1.0"
identify "%Z%%M% %I% %E%"
#: Copyright (c) 1995, 2002 by Wayne C. Gramlich.
#, All rights reserved.
#,
#, Permission to use, copy, modify, distribute, and sell this software
#, for any purpose is hereby granted without fee provided that the above
#, copyright notice and this permission are retained. The author makes
#, no representations about the suitability of this software for any purpose.
#, It is provided "as is" without express or implied warranty.
module differ_test
#: This module implements tests the {differ
} module.
procedure main
takes
system system
returns unsigned
#: This procedure will check the {aligns_find
}@{differ_table
}
#, procedure.
procedure check
takes
differ_table differ_table[string]
debug_stream out_stream
test_name string
string1 string
string2 string
returns_nothing
#: This procedure will verify that the appropriate differences
#, between {string1
} and {string2
} are determined by
#, {aligns_find
}@{differ_table
}(). The format of {string1
} and
#, {string2
} is a list of space separated words. Differences
#, between the two strings are indicated by enclosing the
#, differences in square brackets ('[...]'). The test results
#, labeled by {test_name
} are output to {debug_stream
}.
procedure text_append@string
takes
append_string string
text string
returns_nothing
#: This procedure will append {append_string
} to the end of {text
}.
procedure text_append@sequence[item]
takes
sequence sequence[item]
text string
type align_type
label string
returns_nothing
needs
procedure text_append@item
takes item, string
returns_nothing
procedure print@item
takes item, out_stream
returns_nothing
#: This procedure will append {sequence
} to {text
}.
procedure split@string
takes
text string
separator character
returns vector[string]
#: This procedure will break {text
} into a sequence of words
#, separated by {separator
} and return the sequence. Multiple
#, occurrances of {separator
} in a row are treated as a single
#, occurance of {separator
}. The `[' and `]' characters are
#, ignored.