mirror of
https://github.com/samba-team/samba.git
synced 2025-02-28 01:58:17 +03:00
Revert "lib/util:tests/time.c - "test_timestring" - fix it on Solaris"
This reverts commit 654e0102ddb0acaaf45fb55c15818722235fcc9f. This should better be handled by the replace library. Autobuild-User: Matthias Dieter Wallnöfer <mdw@samba.org> Autobuild-Date: Mon Dec 6 12:17:31 CET 2010 on sn-devel-104
This commit is contained in:
parent
619a49c421
commit
bd3e5804a4
@ -64,7 +64,7 @@ static bool test_http_timestring(struct torture_context *tctx)
|
||||
|
||||
static bool test_timestring(struct torture_context *tctx)
|
||||
{
|
||||
const char *start = "Thu Jan 1", *start2 = "Thu Jan 01";
|
||||
const char *start = "Thu Jan 1";
|
||||
char *result;
|
||||
/*
|
||||
* Correct test for negative UTC offset. Without the correction, the
|
||||
@ -77,10 +77,7 @@ static bool test_timestring(struct torture_context *tctx)
|
||||
time_t utc_offset = mktime(&local) - mktime(&gmt);
|
||||
|
||||
result = timestring(tctx, 42 - (utc_offset < 0 ? utc_offset : 0));
|
||||
torture_assert(tctx,
|
||||
(strncmp(start, result, strlen(start)) == 0) ||
|
||||
(strncmp(start2, result, strlen(start2)) == 0),
|
||||
result);
|
||||
torture_assert(tctx, !strncmp(start, result, strlen(start)), result);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user