/
niceSOFT
/
gawk
Обзор
Документация
Войти
/
niceSOFT
/
gawk
Код
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
test/case-check.awk
31 строка
1 KB
Arnold D. Robbins
Additional tests for ignore case matching.
05 апр 2026, 15:27
05 апр 2026, 15:27
a5ec8d7
Код
Авторство
О чём код?
BEGIN { tf[0] = "false" tf[1] = "true" IGNORECASE = 1 printf("case (i):\n") printf("\tΣ ~ σ: expect true, got %s\n", tf["Σ" ~ "σ"]) printf("\tσ ~ Σ: expect true, got %s\n", tf["σ" ~ "Σ"]) printf("\tΣ ~ ς: expect true, got %s\n", tf["Σ" ~ "ς"]) printf("\tς ~ Σ: expect false, got %s\n", tf["ς" ~ "Σ"]) printf("\tσ ~ ς: expect false, got %s\n", tf["σ" ~ "ς"]) printf("\tς ~ σ: expect false, got %s\n", tf["ς" ~ "σ"]) printf("case (ii)\n") printf("\tΩ ~ ω: expect true, got %s\n", tf["Ω" ~ "ω"]) printf("\tω ~ Ω: expect true, got %s\n", tf["ω" ~ "Ω"]) printf("\tΩ ~ ω: expect false, got %s\n", tf["Ω" ~ "ω"]) printf("\tω ~ Ω: expect true, got %s\n", tf["ω" ~ "Ω"]) printf("\tΩ ~ Ω: expect false, got %s\n", tf["Ω" ~ "Ω"]) printf("\tΩ ~ Ω: expect false, got %s\n", tf["Ω" ~ "Ω"]) printf("case (iii)\n") printf("\tẞ ~ ß: expect false, got %s\n", tf["ẞ" ~ "ß"]) printf("\tß ~ ẞ: expect true, got %s\n", tf["ß" ~ "ẞ"]) printf("case (iv)\n") printf("\tDŽ ~ dž: expect true, got %s\n", tf["DŽ " ~ "dž"]) printf("\tdž ~ DŽ: expect true, got %s\n", tf["dž " ~ "DŽ"]) printf("\tDŽ ~ Dž: expect true, got %s\n", tf["DŽ " ~ "Dž"]) printf("\tDž ~ DŽ: expect false, got %s\n", tf["Dž " ~ "DŽ"]) printf("\tdž ~ Dž: expect true, got %s\n", tf["dž " ~ "Dž"]) printf("\tDž ~ dž: expect false, got %s\n", tf["Dž " ~ "dž"]) }