diff options
author | Pixel <pixel@nobis-crew.org> | 2011-10-10 20:31:41 -0700 |
---|---|---|
committer | Pixel <pixel@nobis-crew.org> | 2011-10-10 20:31:41 -0700 |
commit | 8ae349b49e16064e4d84b6cfd256e3ca7fb0cd60 (patch) | |
tree | 8b01b3ab2097d838771d43c79b92920661ffd37c /tests/test-Handles.cc | |
parent | 965148b43b5b859934b7af2e8447ba1026a43a19 (diff) |
Adding the 'stats' call to Input.
Also fixing a bug with the Printer - va_args are vicious.
Diffstat (limited to 'tests/test-Handles.cc')
-rw-r--r-- | tests/test-Handles.cc | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/tests/test-Handles.cc b/tests/test-Handles.cc index 38b020b..68d8baa 100644 --- a/tests/test-Handles.cc +++ b/tests/test-Handles.cc @@ -17,6 +17,14 @@ void MainTask::Do() { } Assert(failed); IO i(new Input("Makefile")); - + Printer::log(M_STATUS, "Opened file %s:", i->getName()); + Printer::log(M_STATUS, " - size = %lli", i->getSize()); + char mtimestr[32]; + time_t mtime = i->getMTime(); + ctime_r(&mtime, mtimestr); + char * nl = strrchr(mtimestr, '\n'); + if (nl) + *nl = 0; + Printer::log(M_STATUS, " - mtime = %i (%s)", mtime, mtimestr); Printer::log(M_STATUS, "Test::Handles passed."); } |