File indexing completed on 2024-04-06 12:13:15
0001 #include "FWCore/Utilities/interface/stemFromPath.h"
0002
0003 #include "catch.hpp"
0004
0005 TEST_CASE("Test stemFromPath", "[sources]") {
0006 CHECK(edm::stemFromPath("foo.root") == "foo");
0007 CHECK(edm::stemFromPath("/foo.root") == "foo");
0008 CHECK(edm::stemFromPath("/bar/foo.root") == "foo");
0009 CHECK(edm::stemFromPath("/bar///....//...///foo.root") == "foo");
0010 CHECK(edm::stemFromPath("/bar/foo.xyzzy") == "foo");
0011 CHECK(edm::stemFromPath("/bar/xyzzy.foo.root") == "xyzzy");
0012 CHECK(edm::stemFromPath("file:foo.root") == "foo");
0013 CHECK(edm::stemFromPath("file:/path/to/bar.txt") == "bar");
0014 CHECK(edm::stemFromPath("root://server.somewhere:port/whatever?param=path/to/bar.txt") == "bar");
0015 }