improved test code
This commit is contained in:
parent
eeaa962aba
commit
a3f0de4582
@ -20,9 +20,10 @@
|
||||
using namespace std;
|
||||
|
||||
void print_help() {
|
||||
std::cout << "usage: sciotest [-h][-v][-t TEST_ID]\n";
|
||||
std::cout << "usage: sciotest -h|-v|-t TEST_ID\n";
|
||||
std::cout << " -h, --help show this help text and exit\n";
|
||||
std::cout << " -t, --test perform test with given ID\n";
|
||||
std::cout << " -t, --test perform test with given TEST_ID\n";
|
||||
std::cout << " currently a number between 1 and 5, inclusive\n";
|
||||
std::cout << " -v, --version show version number and exit\n";
|
||||
}
|
||||
|
||||
@ -88,8 +89,9 @@ void test5() {
|
||||
file << "A line of text\n";
|
||||
file.seekg(0);
|
||||
string line;
|
||||
file >> line;
|
||||
cout << line;
|
||||
if (getline(file, line)) {
|
||||
cout << line << '\n';
|
||||
}
|
||||
throw_if_min1(::close(fd));
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user