Browse Source

* Added a few more Unicode characters to the export and unicode tests.

tags/v0.99.beta14
Sam Hocevar sam 18 years ago
parent
commit
a870a7ef97
2 changed files with 32 additions and 31 deletions
  1. +2
    -2
      test/export.c
  2. +30
    -29
      test/unicode.c

+ 2
- 2
test/export.c View File

@@ -92,8 +92,8 @@ int main(int argc, char *argv[])

cucul_set_color(qq, CUCUL_COLOR_BLACK, CUCUL_COLOR_WHITE);
cucul_fill_ellipse(qq, WIDTH / 2, HEIGHT / 2, WIDTH / 4, HEIGHT / 4, ' ');
cucul_putstr(qq, WIDTH / 2 - 1, HEIGHT / 2 - 4, "\\o/");
cucul_putstr(qq, WIDTH / 2 - 1, HEIGHT / 2 + 4, "\\o/");
cucul_putstr(qq, WIDTH / 2 - 1, HEIGHT / 2 - 2, "\\o/");
cucul_putstr(qq, WIDTH / 2 - 7, HEIGHT / 2 + 2, "äβç ░▒▓█▓▒░ ΔЗҒ");

cucul_set_color(qq, CUCUL_COLOR_WHITE, CUCUL_COLOR_LIGHTBLUE);
cucul_putstr(qq, WIDTH / 2 - 7, HEIGHT / 2, " LIBCACA ");


+ 30
- 29
test/unicode.c View File

@@ -36,48 +36,49 @@ int main(void)
cucul_putstr(qq, 1, 1, "Basic Unicode support");

cucul_set_color(qq, CUCUL_COLOR_LIGHTGRAY, CUCUL_COLOR_BLACK);
cucul_putstr(qq, 1, 2, "This is ASCII: [ abc DEF 123 !@# ]");
cucul_putstr(qq, 1, 3, "This is Unicode: [ äβç ΔЗҒ ░▒▓ ♩♔✈ ]");
cucul_putstr(qq, 1, 2, "This is ASCII: | abc DEF 123 !@# |");
cucul_putstr(qq, 1, 3, "This is Unicode: | äßç δεφ ░▒▓ ╞╬╗ |");
cucul_putstr(qq, 1, 4, "And this is, too: | ἀβϛ ΔЗҒ ᚴᛒᛯ ♩♔✈ |");

cucul_putstr(qq, 1, 4, "If the two lines do not have the same length, there is a bug somewhere.");
cucul_putstr(qq, 1, 5, "If the three lines do not have the same length, there is a bug somewhere.");

cucul_set_color(qq, CUCUL_COLOR_WHITE, CUCUL_COLOR_BLUE);
cucul_putstr(qq, 1, 6, "Gradient glyphs");
cucul_putstr(qq, 1, 7, "Gradient glyphs");

cucul_set_color(qq, CUCUL_COLOR_LIGHTGRAY, CUCUL_COLOR_BLACK);
cucul_putstr(qq, 31, 7, " 0%");
cucul_putstr(qq, 31, 8, " 25%");
cucul_putstr(qq, 31, 9, " 50%");
cucul_putstr(qq, 31, 10, " 75%");
cucul_putstr(qq, 31, 11, "100%");
cucul_set_color(qq, CUCUL_COLOR_RED, CUCUL_COLOR_CYAN);
cucul_putstr(qq, 1, 7, " ");
cucul_putstr(qq, 1, 8, "░░░░░░░░░░░░░░░░░░░░░░░░░░░░░");
cucul_putstr(qq, 1, 9, "▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒");
cucul_putstr(qq, 1, 10, "▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓");
cucul_putstr(qq, 1, 11, "█████████████████████████████");
cucul_set_color(qq, CUCUL_COLOR_CYAN, CUCUL_COLOR_RED);
cucul_putstr(qq, 36, 7, "█████████████████████████████");
cucul_putstr(qq, 36, 8, "▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓");
cucul_putstr(qq, 36, 9, "▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒");
cucul_putstr(qq, 36, 10, "░░░░░░░░░░░░░░░░░░░░░░░░░░░░░");
cucul_putstr(qq, 36, 11, " ");
cucul_putstr(qq, 31, 8, " 0%");
cucul_putstr(qq, 31, 9, " 25%");
cucul_putstr(qq, 31, 10, " 50%");
cucul_putstr(qq, 31, 11, " 75%");
cucul_putstr(qq, 31, 12, "100%");
cucul_set_color(qq, CUCUL_COLOR_LIGHTRED, CUCUL_COLOR_LIGHTGREEN);
cucul_putstr(qq, 1, 8, " ");
cucul_putstr(qq, 1, 9, "░░░░░░░░░░░░░░░░░░░░░░░░░░░░░");
cucul_putstr(qq, 1, 10, "▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒");
cucul_putstr(qq, 1, 11, "▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓");
cucul_putstr(qq, 1, 12, "█████████████████████████████");
cucul_set_color(qq, CUCUL_COLOR_LIGHTGREEN, CUCUL_COLOR_LIGHTRED);
cucul_putstr(qq, 36, 8, "█████████████████████████████");
cucul_putstr(qq, 36, 9, "▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓");
cucul_putstr(qq, 36, 10, "▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒");
cucul_putstr(qq, 36, 11, "░░░░░░░░░░░░░░░░░░░░░░░░░░░░░");
cucul_putstr(qq, 36, 12, " ");

cucul_set_color(qq, CUCUL_COLOR_WHITE, CUCUL_COLOR_BLUE);
cucul_putstr(qq, 1, 13, "Double width characters");
cucul_putstr(qq, 1, 14, "Double width characters");

cucul_set_color(qq, CUCUL_COLOR_LIGHTRED, CUCUL_COLOR_BLACK);
cucul_putstr(qq, 1, 14, "ドラゴン ボーレ |");
cucul_putstr(qq, 1, 15, "| ドラゴン ボーレ |");
cucul_set_color(qq, CUCUL_COLOR_LIGHTGRAY, CUCUL_COLOR_BLACK);
cucul_putstr(qq, 1, 15, "()()()() ()()() |");
cucul_putstr(qq, 1, 16, "| ()()()() ()()() |");
cucul_set_color(qq, CUCUL_COLOR_YELLOW, CUCUL_COLOR_BLACK);
cucul_putstr(qq, 1, 16, "ドラゴン");
cucul_putstr(qq, 10, 16, "ボーレ |");
cucul_putstr(qq, 1, 17, "| ドラゴン");
cucul_putstr(qq, 10, 17, "ボーレ |");

cucul_set_color(qq, CUCUL_COLOR_LIGHTGRAY, CUCUL_COLOR_BLACK);
cucul_putstr(qq, 1, 17, "If the three lines do not have the same length, there is a bug somewhere.");
cucul_putstr(qq, 1, 18, "If the three lines do not have the same length, there is a bug somewhere.");

caca_display(kk);



Loading…
Cancel
Save