#include <locale>
#include <sstream>
#include <testsuite_hooks.h>
void test03()
{
using namespace std;
typedef ostreambuf_iterator<wchar_t> iterator_type;
bool test __attribute__((unused)) = true;
tm time1 = { 0, 0, 12, 4, 3, 71, 0, 93, 0 };
locale loc_c = locale::classic();
locale loc_hk = __gnu_test::try_named_locale("en_HK");
VERIFY( loc_hk != loc_c );
const wstring empty;
wostringstream oss;
oss.imbue(loc_hk);
const time_put<wchar_t>& tim_put = use_facet<time_put<wchar_t> >(oss.getloc());
iterator_type os_it03 = tim_put.put(oss.rdbuf(), oss, L'*', &time1, 'a');
wstring result3 = oss.str();
VERIFY( result3 == L"Sun" );
oss.str(empty); iterator_type os_it25 = tim_put.put(oss.rdbuf(), oss, L'*', &time1, 'x');
wstring result25 = oss.str(); VERIFY( result25 == L"Sunday, April 04, 1971" );
oss.str(empty); iterator_type os_it26 = tim_put.put(oss.rdbuf(), oss, L'*', &time1, 'X');
wstring result26 = oss.str(); VERIFY( result26.find(L"12:00:00") != wstring::npos );
oss.str(empty);
iterator_type os_it35 = tim_put.put(oss.rdbuf(), oss, L'*', &time1, 'x', 'E');
wstring result35 = oss.str(); VERIFY( result35 == L"Sunday, April 04, 1971" );
oss.str(empty);
iterator_type os_it36 = tim_put.put(oss.rdbuf(), oss, L'*', &time1, 'X', 'E');
wstring result36 = oss.str(); VERIFY( result36.find(L"12:00:00") != wstring::npos );
}
int main()
{
test03();
return 0;
}