2 * @file Bug_3532_Regression_Test.cpp
4 * Reproduces the problems reported in bug 3532
5 * http://bugzilla.dre.vanderbilt.edu/show_bug.cgi?id=3532
7 * @author Martin Gaus <Gaus at gmx dot de>
10 #include "test_config.h"
14 run_main (int, ACE_TCHAR
*[])
16 ACE_START_TEST (ACE_TEXT ("Bug_3532_Regression_Test"));
21 // Write a ASCII file with one byte (no BOM)
23 FILE* pFile
= ACE_OS::fopen(ACE_TEXT("OneByteFile"), ACE_TEXT("wb"));
24 ACE_OS::fwrite(&Buffer
, 1, 1, pFile
);
25 ACE_OS::fclose(pFile
);
27 // Reopen the file and read the byte
29 pFile
= ACE_OS::fopen(ACE_TEXT("OneByteFile"), ACE_TEXT("rb"));
30 size_t BytesRead
= ACE_OS::fread(&Buffer
, 1, 1, pFile
);
37 ACE_TEXT ("Error: 'T' expected!!!\n")));
44 ACE_TEXT ("Error: One byte should be read!!!\n")));
47 ACE_OS::fclose(pFile
);