32 int main(
int argc,
char** argv ) {
40 strstr <<
" now, is, the, time ";
41 expected =
" now, is, the, time ";
43 cout << ( returned == expected ?
"OK" :
"NOT OK" ) << endl;
49 strstr <<
" now, is, the, time \n";
50 expected =
" now, is, the, time";
52 cout << ( returned == expected ?
"OK" :
"NOT OK" ) << endl;
58 strstr <<
" now, is, the, time \\ \n" 59 <<
" now, is, the, time \\ \n" 60 <<
" now, is, the, time ";
61 expected =
" now, is, the, time ";
62 expected +=
" now, is, the, time ";
63 expected +=
" now, is, the, time ";
65 cout << ( returned == expected ?
"OK" :
"NOT OK" ) << endl;
71 strstr <<
" now, is, the, time \\ \n" 72 <<
" now, is, the, time \\ \n" 73 <<
" now, is, the, time ";
74 expected =
" now, is, the, time \\\n";
75 expected +=
" now, is, the, time \\\n";
76 expected +=
" now, is, the, time ";
78 cout << ( returned == expected ?
"OK" :
"NOT OK" ) << endl;
84 strstr <<
" now, is, the, time \n";
85 expected =
" now, is, the, time";
87 cout << ( returned == expected ?
"OK" :
"NOT OK" ) << endl;
93 strstr <<
" now, is, the, time \\ \n" 94 <<
" now, is, the, time \\ \n" 95 <<
" now, is, the, time ";
96 expected =
" now, is, the, time ";
97 expected +=
" now, is, the, time ";
98 expected +=
" now, is, the, time";
100 cout << ( returned == expected ?
"OK" :
"NOT OK" ) << endl;
106 strstr <<
" now, is, the, time \\ \n" 107 <<
" now, is, the, time \\ \n" 108 <<
" now, is, the, time ";
109 expected =
" now, is, the, time \\\n";
110 expected +=
" now, is, the, time \\\n";
111 expected +=
" now, is, the, time";
113 cout << ( returned == expected ?
"OK" :
"NOT OK" ) << endl;
119 strstr <<
" now, is, the, time - \n" 120 <<
" now, is, the, time - \n" 121 <<
" now, is, the, time ";
122 expected =
" now, is, the, time ";
123 expected +=
" now, is, the, time ";
124 expected +=
" now, is, the, time ";
126 cout << ( returned == expected ?
"OK" :
"NOT OK" ) << endl;
istream & getrecord(istream &is, string &str, int opt=READ_PHYS, char delim='\n', char continuation='\\')
Reads physical and logical lines.