blob: 30985688b895c01b0f4050294f7b0a25bf61cee6 [file] [log] [blame]
Denys Vlasenkoed910c72010-01-31 00:10:18 +01001#!/bin/sh
2# Copyright 2010 by Denys Vlasenko
3# Licensed under GPL v2, see file LICENSE for details.
4
5. ./testing.sh
6
7test -f "$bindir/.config" && . "$bindir/.config"
8
9# testing "test name" "command" "expected result" "file input" "stdin"
10
11testing "cal 2000" "cal 1 2000" "\
12 January 2000
13Su Mo Tu We Th Fr Sa
14 1
15 2 3 4 5 6 7 8
16 9 10 11 12 13 14 15
1716 17 18 19 20 21 22
1823 24 25 26 27 28 29
1930 31
20" "" ""
21
22test x"$CONFIG_LOCALE_SUPPORT" = x"y" \
Denys Vlasenko19158a82010-03-26 14:06:56 +010023&& test x"$CONFIG_UNICODE_SUPPORT" = x"y" \
Denys Vlasenkoed910c72010-01-31 00:10:18 +010024&& test x"$CONFIG_LAST_SUPPORTED_WCHAR" = x"0" \
25&& test x"$CONFIG_UNICODE_WIDE_WCHARS" = x"y" \
26&& test x"$CONFIG_STATIC" != x"y" \
27&& test x"$CONFIG_CROSS_COMPILER_PREFIX" = x"" \
28&& testing "unicode cal 2000" "LANG=zh_TW.utf8 cal 1 2000" "\
29 一月 2000
30日 一 二 三 四 五 六
31 1
32 2 3 4 5 6 7 8
33 9 10 11 12 13 14 15
3416 17 18 19 20 21 22
3523 24 25 26 27 28 29
3630 31
37" "" ""
38
39exit $FAILCOUNT