kimwalisch/primecount

Test results.txt on Windows

Closed this issue · 1 comments

I have written a basename() function which needs to be tested on Windows using both MSVC and GCC:

string basename(string path)
{
  while (path.back() == '/' ||
         path.back() == '\\')
  {
    path.pop_back();
  }

  size_t pos = path.find_last_of("/\\");

  if (pos != string::npos)
    return path.substr(pos + 1);

  return path;
}

The basename() function should produce entries like the one below (primecount without any slashes or backslashes) in results.txt:

primecount 1e17 -s --S2_trivial

Test OK.