diff options
author | Martin Pool <mbp@samba.org> | 2003-03-19 08:32:42 +0000 |
---|---|---|
committer | Martin Pool <mbp@samba.org> | 2003-03-19 08:32:42 +0000 |
commit | 41fdeceb82d7607fc6f3e9b31640d5e264f8ed9a (patch) | |
tree | 78eb71a8302866e8cace45fca8ab478a00a69428 /source3 | |
parent | de12a0d95402511907064e82547d614df8f9a2aa (diff) | |
download | samba-41fdeceb82d7607fc6f3e9b31640d5e264f8ed9a.tar.gz samba-41fdeceb82d7607fc6f3e9b31640d5e264f8ed9a.tar.bz2 samba-41fdeceb82d7607fc6f3e9b31640d5e264f8ed9a.zip |
Add additional StrCaseCmp test cases.
Doc.
(This used to be commit ac6027884b04943fac3d469ff6542d62293f46cc)
Diffstat (limited to 'source3')
-rwxr-xr-x | source3/stf/strings.py | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/source3/stf/strings.py b/source3/stf/strings.py index fb26c2f9e5..a67e137058 100755 --- a/source3/stf/strings.py +++ b/source3/stf/strings.py @@ -42,16 +42,28 @@ class StrCaseCmp_Ascii_Tests(comfychair.TestCase): " result=%s\n" % (`a`, `b`, `expect`, `out`)) def runtest(self): + # A, B, strcasecmp(A, B) cases = [('hello', 'hello', 0), ('hello', 'goodbye', +1), ('goodbye', 'hello', -1), - ('hell', 'hello', -1)] + ('hell', 'hello', -1), + ('', '', 0), + ('a', '', +1), + ('', 'a', -1), + ('a', 'A', 0), + ('aa', 'aA', 0), + ('Aa', 'aa', 0), + ('longstring ' * 100, 'longstring ' * 100, 0), + ('longstring ' * 100, 'longstring ' * 100 + 'a', -1), + ('longstring ' * 100 + 'a', 'longstring ' * 100, +1), + ] for a, b, expect in cases: self.run_strcmp(a, b, expect) - +# Define the tests exported by this module tests = [StrCaseCmp_Ascii_Tests] +# Handle execution of this file as a main program if __name__ == '__main__': comfychair.main(tests) |