added test for fdistream

This commit is contained in:
Bob Polis 2020-02-22 21:19:15 +01:00
parent 250e5cbf46
commit 2165710720

View File

@ -15,8 +15,13 @@ using namespace std;
int main(int /*argc*/, const char * argv[]) {
try {
sc::io::fdostream chan(1);
chan << "hello, sciotest\n";
sc::io::fdostream chan {1};
chan << "Please enter a line of text:\n";
string line;
sc::io::fdistream is {0};
getline(is, line);
cout << line << '\n';
} catch (const exception& ex) {
cerr << su::basename(argv[0]) << ": " << ex.what() << '\n';
return EXIT_FAILURE;