Update.
2002-04-15 Bruno Haible <bruno@clisp.org>
* iconvdata/armscii-8.c (BODY for FROM_LOOP): Fix array access.
(BODY for TO_LOOP): Likewise.
* iconvdata/tcvn5712-1.c (from_ucs4): Map U+0309 to 0xB1.
* iconvdata/tst-table.sh: Add support for encodings which contain
precomposed Unicode characters, known to the iconv converter in both
directions but not listed in the charmap.
* iconvdata/IBM856.irreversible: New file.
* iconvdata/IBM922.irreversible: New file.
* iconvdata/IBM1132.irreversible: New file.
* iconvdata/IBM1133.irreversible: New file.
* iconvdata/IBM1160.irreversible: New file.
* iconvdata/IBM1161.irreversible: New file.
* iconvdata/IBM1163.irreversible: New file.
* iconvdata/IBM1164.irreversible: New file.
* iconvdata/ARMSCII-8.irreversible: New file.
* iconvdata/TCVN5712-1.precomposed: New file.
* iconvdata/tst-tables.sh: Add IBM856, IBM922, IBM1124, IBM1129,
IBM1160, IBM1161, IBM1132, IBM1133, IBM1162, IBM1163, IBM1164,
ARMSCII-8, TCVN5712-1.
* iconvdata/Makefile (distribute): Add IBM856.irreversible,
IBM922.irreversible, IBM1132.irreversible, IBM1133.irreversible,
IBM1160.irreversible, IBM1161.irreversible, IBM1163.irreversible,
IBM1164.irreversible, ARMSCII-8.irreversible, TCVN5712-1.precomposed.
2002-04-17 Jakub Jelinek <jakub@redhat.com>
* time/tst-mktime.c: Include <stdlib.h>. Use %d, not %ld format
for EVENING69. Include offsets in TZ environment variable.
2002-04-19 15:49:16 +08:00
|
|
|
#include <stdlib.h>
|
2001-01-09 09:04:59 +08:00
|
|
|
#include <stdio.h>
|
|
|
|
#include <string.h>
|
|
|
|
#include <time.h>
|
|
|
|
|
2014-11-05 17:54:08 +08:00
|
|
|
static int
|
|
|
|
do_test (void)
|
2001-01-09 09:04:59 +08:00
|
|
|
{
|
2002-04-15 14:37:43 +08:00
|
|
|
struct tm time_str, *tm;
|
|
|
|
time_t t;
|
2001-01-09 09:04:59 +08:00
|
|
|
char daybuf[20];
|
|
|
|
int result;
|
|
|
|
|
|
|
|
time_str.tm_year = 2001 - 1900;
|
|
|
|
time_str.tm_mon = 7 - 1;
|
|
|
|
time_str.tm_mday = 4;
|
|
|
|
time_str.tm_hour = 0;
|
|
|
|
time_str.tm_min = 0;
|
|
|
|
time_str.tm_sec = 1;
|
|
|
|
time_str.tm_isdst = -1;
|
|
|
|
|
|
|
|
if (mktime (&time_str) == -1)
|
|
|
|
{
|
|
|
|
(void) puts ("-unknown-");
|
|
|
|
result = 1;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
(void) strftime (daybuf, sizeof (daybuf), "%A", &time_str);
|
|
|
|
(void) puts (daybuf);
|
|
|
|
result = strcmp (daybuf, "Wednesday") != 0;
|
|
|
|
}
|
|
|
|
|
Update.
2002-04-15 Bruno Haible <bruno@clisp.org>
* iconvdata/armscii-8.c (BODY for FROM_LOOP): Fix array access.
(BODY for TO_LOOP): Likewise.
* iconvdata/tcvn5712-1.c (from_ucs4): Map U+0309 to 0xB1.
* iconvdata/tst-table.sh: Add support for encodings which contain
precomposed Unicode characters, known to the iconv converter in both
directions but not listed in the charmap.
* iconvdata/IBM856.irreversible: New file.
* iconvdata/IBM922.irreversible: New file.
* iconvdata/IBM1132.irreversible: New file.
* iconvdata/IBM1133.irreversible: New file.
* iconvdata/IBM1160.irreversible: New file.
* iconvdata/IBM1161.irreversible: New file.
* iconvdata/IBM1163.irreversible: New file.
* iconvdata/IBM1164.irreversible: New file.
* iconvdata/ARMSCII-8.irreversible: New file.
* iconvdata/TCVN5712-1.precomposed: New file.
* iconvdata/tst-tables.sh: Add IBM856, IBM922, IBM1124, IBM1129,
IBM1160, IBM1161, IBM1132, IBM1133, IBM1162, IBM1163, IBM1164,
ARMSCII-8, TCVN5712-1.
* iconvdata/Makefile (distribute): Add IBM856.irreversible,
IBM922.irreversible, IBM1132.irreversible, IBM1133.irreversible,
IBM1160.irreversible, IBM1161.irreversible, IBM1163.irreversible,
IBM1164.irreversible, ARMSCII-8.irreversible, TCVN5712-1.precomposed.
2002-04-17 Jakub Jelinek <jakub@redhat.com>
* time/tst-mktime.c: Include <stdlib.h>. Use %d, not %ld format
for EVENING69. Include offsets in TZ environment variable.
2002-04-19 15:49:16 +08:00
|
|
|
setenv ("TZ", "EST+5", 1);
|
2002-04-15 14:37:43 +08:00
|
|
|
#define EVENING69 1 * 60 * 60 + 2 * 60 + 29
|
|
|
|
t = EVENING69;
|
|
|
|
tm = localtime (&t);
|
|
|
|
if (tm == NULL)
|
|
|
|
{
|
|
|
|
(void) puts ("localtime returned NULL");
|
|
|
|
result = 1;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
time_str = *tm;
|
|
|
|
t = mktime (&time_str);
|
|
|
|
if (t != EVENING69)
|
|
|
|
{
|
Update.
2002-04-15 Bruno Haible <bruno@clisp.org>
* iconvdata/armscii-8.c (BODY for FROM_LOOP): Fix array access.
(BODY for TO_LOOP): Likewise.
* iconvdata/tcvn5712-1.c (from_ucs4): Map U+0309 to 0xB1.
* iconvdata/tst-table.sh: Add support for encodings which contain
precomposed Unicode characters, known to the iconv converter in both
directions but not listed in the charmap.
* iconvdata/IBM856.irreversible: New file.
* iconvdata/IBM922.irreversible: New file.
* iconvdata/IBM1132.irreversible: New file.
* iconvdata/IBM1133.irreversible: New file.
* iconvdata/IBM1160.irreversible: New file.
* iconvdata/IBM1161.irreversible: New file.
* iconvdata/IBM1163.irreversible: New file.
* iconvdata/IBM1164.irreversible: New file.
* iconvdata/ARMSCII-8.irreversible: New file.
* iconvdata/TCVN5712-1.precomposed: New file.
* iconvdata/tst-tables.sh: Add IBM856, IBM922, IBM1124, IBM1129,
IBM1160, IBM1161, IBM1132, IBM1133, IBM1162, IBM1163, IBM1164,
ARMSCII-8, TCVN5712-1.
* iconvdata/Makefile (distribute): Add IBM856.irreversible,
IBM922.irreversible, IBM1132.irreversible, IBM1133.irreversible,
IBM1160.irreversible, IBM1161.irreversible, IBM1163.irreversible,
IBM1164.irreversible, ARMSCII-8.irreversible, TCVN5712-1.precomposed.
2002-04-17 Jakub Jelinek <jakub@redhat.com>
* time/tst-mktime.c: Include <stdlib.h>. Use %d, not %ld format
for EVENING69. Include offsets in TZ environment variable.
2002-04-19 15:49:16 +08:00
|
|
|
printf ("mktime returned %ld, expected %d\n",
|
2002-04-15 14:37:43 +08:00
|
|
|
(long) t, EVENING69);
|
|
|
|
result = 1;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
(void) puts ("Dec 31 1969 EST test passed");
|
|
|
|
|
Update.
2002-04-15 Bruno Haible <bruno@clisp.org>
* iconvdata/armscii-8.c (BODY for FROM_LOOP): Fix array access.
(BODY for TO_LOOP): Likewise.
* iconvdata/tcvn5712-1.c (from_ucs4): Map U+0309 to 0xB1.
* iconvdata/tst-table.sh: Add support for encodings which contain
precomposed Unicode characters, known to the iconv converter in both
directions but not listed in the charmap.
* iconvdata/IBM856.irreversible: New file.
* iconvdata/IBM922.irreversible: New file.
* iconvdata/IBM1132.irreversible: New file.
* iconvdata/IBM1133.irreversible: New file.
* iconvdata/IBM1160.irreversible: New file.
* iconvdata/IBM1161.irreversible: New file.
* iconvdata/IBM1163.irreversible: New file.
* iconvdata/IBM1164.irreversible: New file.
* iconvdata/ARMSCII-8.irreversible: New file.
* iconvdata/TCVN5712-1.precomposed: New file.
* iconvdata/tst-tables.sh: Add IBM856, IBM922, IBM1124, IBM1129,
IBM1160, IBM1161, IBM1132, IBM1133, IBM1162, IBM1163, IBM1164,
ARMSCII-8, TCVN5712-1.
* iconvdata/Makefile (distribute): Add IBM856.irreversible,
IBM922.irreversible, IBM1132.irreversible, IBM1133.irreversible,
IBM1160.irreversible, IBM1161.irreversible, IBM1163.irreversible,
IBM1164.irreversible, ARMSCII-8.irreversible, TCVN5712-1.precomposed.
2002-04-17 Jakub Jelinek <jakub@redhat.com>
* time/tst-mktime.c: Include <stdlib.h>. Use %d, not %ld format
for EVENING69. Include offsets in TZ environment variable.
2002-04-19 15:49:16 +08:00
|
|
|
setenv ("TZ", "CET-1", 1);
|
2002-04-15 14:37:43 +08:00
|
|
|
t = mktime (&time_str);
|
2004-11-01 08:21:39 +08:00
|
|
|
#define EVENING69_CET (EVENING69 - (5 - -1) * 60 * 60)
|
|
|
|
if (t != EVENING69_CET)
|
2002-04-15 14:37:43 +08:00
|
|
|
{
|
2004-11-01 08:21:39 +08:00
|
|
|
printf ("mktime returned %ld, expected %ld\n",
|
|
|
|
(long) t, (long) EVENING69_CET);
|
2002-04-15 14:37:43 +08:00
|
|
|
result = 1;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
(void) puts ("Dec 31 1969 CET test passed");
|
|
|
|
}
|
|
|
|
|
2001-01-09 09:04:59 +08:00
|
|
|
return result;
|
|
|
|
}
|
2014-11-05 17:54:08 +08:00
|
|
|
|
|
|
|
#define TEST_FUNCTION do_test ()
|
|
|
|
#include "../test-skeleton.c"
|