From 8ae349b49e16064e4d84b6cfd256e3ca7fb0cd60 Mon Sep 17 00:00:00 2001 From: Pixel Date: Mon, 10 Oct 2011 20:31:41 -0700 Subject: Adding the 'stats' call to Input. Also fixing a bug with the Printer - va_args are vicious. --- tests/test-Handles.cc | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'tests/test-Handles.cc') 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."); } -- cgit v1.2.3