#include <locale>
#include <sstream>
#include <testsuite_hooks.h>
void test03()
{
using namespace std;
typedef ostreambuf_iterator<char> 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 string empty;
ostringstream oss;
oss.imbue(loc_hk);
const time_put<char>& tim_put = use_facet<time_put<char> >(oss.getloc());
iterator_type os_it03 = tim_put.put(oss.rdbuf(), oss, '*', &time1, 'a');
string result3 = oss.str();
VERIFY( result3 == "Sun" );
oss.str(empty); iterator_type os_it25 = tim_put.put(oss.rdbuf(), oss, '*', &time1, 'x');
string result25 = oss.str(); VERIFY( result25 == "Sunday, April 04, 1971" );
oss.str(empty); iterator_type os_it26 = tim_put.put(oss.rdbuf(), oss, '*', &time1, 'X');
string result26 = oss.str(); VERIFY( result26.find("12:00:00") != string::npos );
oss.str(empty);
iterator_type os_it35 = tim_put.put(oss.rdbuf(), oss, '*', &time1, 'x', 'E');
string result35 = oss.str(); VERIFY( result35 == "Sunday, April 04, 1971" );
oss.str(empty);
iterator_type os_it36 = tim_put.put(oss.rdbuf(), oss, '*', &time1, 'X', 'E');
string result36 = oss.str(); VERIFY( result36.find("12:00:00") != string::npos );
}
int main()
{
test03();
return 0;
}