blob: 5509cf0ef75449c7b02721a97a2e0a22ead726a5 [file] [log] [blame]
Denys Vlasenkoed910c72010-01-31 00:10:18 +01001#!/bin/sh
2# Copyright 2010 by Denys Vlasenko
Denys Vlasenko0ef64bd2010-08-16 20:14:46 +02003# Licensed under GPLv2, see file LICENSE in this source tree.
Denys Vlasenkoed910c72010-01-31 00:10:18 +01004
5. ./testing.sh
Denys Vlasenkoed910c72010-01-31 00:10:18 +01006test -f "$bindir/.config" && . "$bindir/.config"
7
8# testing "test name" "command" "expected result" "file input" "stdin"
9
10testing "cal 2000" "cal 1 2000" "\
11 January 2000
12Su Mo Tu We Th Fr Sa
13 1
14 2 3 4 5 6 7 8
15 9 10 11 12 13 14 15
1616 17 18 19 20 21 22
1723 24 25 26 27 28 29
1830 31
19" "" ""
20
21test x"$CONFIG_LOCALE_SUPPORT" = x"y" \
Denys Vlasenko19158a82010-03-26 14:06:56 +010022&& test x"$CONFIG_UNICODE_SUPPORT" = x"y" \
Denys Vlasenkoed910c72010-01-31 00:10:18 +010023&& test x"$CONFIG_LAST_SUPPORTED_WCHAR" = x"0" \
24&& test x"$CONFIG_UNICODE_WIDE_WCHARS" = x"y" \
25&& test x"$CONFIG_STATIC" != x"y" \
26&& test x"$CONFIG_CROSS_COMPILER_PREFIX" = x"" \
27&& testing "unicode cal 2000" "LANG=zh_TW.utf8 cal 1 2000" "\
28 一月 2000
29日 一 二 三 四 五 六
30 1
31 2 3 4 5 6 7 8
32 9 10 11 12 13 14 15
3316 17 18 19 20 21 22
3423 24 25 26 27 28 29
3530 31
36" "" ""
37
38exit $FAILCOUNT