Staging
v0.5.1
https://github.com/python/cpython
Revision 5aefee6f989821c5dc36d10a9cfd083d7aa737a5 authored by Miss Islington (bot) on 27 January 2020, 22:31:33 UTC, committed by GitHub on 27 January 2020, 22:31:33 UTC

Expose dialog buttons to test code and complete their test coverage.
Complete test coverage for highlights and keys tabs.

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
(cherry picked from commit dd023ad1619b6f1ab313986e8953eea32c18f50c)

Co-authored-by: Cheryl Sabella <cheryl.sabella@gmail.com>
1 parent 414ab5d
Raw File
Tip revision: 5aefee6f989821c5dc36d10a9cfd083d7aa737a5 authored by Miss Islington (bot) on 27 January 2020, 22:31:33 UTC
bpo-30780: Add IDLE configdialog tests (GH-3592)
Tip revision: 5aefee6
pystrcmp.c
/* Cross platform case insensitive string compare functions
 */

#include "Python.h"

int
PyOS_mystrnicmp(const char *s1, const char *s2, Py_ssize_t size)
{
    if (size == 0)
        return 0;
    while ((--size > 0) &&
           (tolower((unsigned)*s1) == tolower((unsigned)*s2))) {
        if (!*s1++ || !*s2++)
            break;
    }
    return tolower((unsigned)*s1) - tolower((unsigned)*s2);
}

int
PyOS_mystricmp(const char *s1, const char *s2)
{
    while (*s1 && (tolower((unsigned)*s1++) == tolower((unsigned)*s2++))) {
        ;
    }
    return (tolower((unsigned)*s1) - tolower((unsigned)*s2));
}
back to top