From 61dc59e612df9c6d2b3a3f4f27f1cb88b6fca98b Mon Sep 17 00:00:00 2001 From: Ben Longbons Date: Tue, 27 Aug 2013 19:05:36 -0700 Subject: Handle far extensions in the mapname extractor This has no effect with the current content, but will make things much more convenient once we start using longer mapnames. --- src/common/extract_test.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/common/extract_test.cpp') diff --git a/src/common/extract_test.cpp b/src/common/extract_test.cpp index d8e9ebe..78478c2 100644 --- a/src/common/extract_test.cpp +++ b/src/common/extract_test.cpp @@ -317,3 +317,16 @@ TEST(extract, record_str) EXPECT_EQ("", z); x = y = z = ""; } + +TEST(extract, mapname) +{ + MapName map; + EXPECT_TRUE(extract("abc", &map)); + EXPECT_EQ(map, "abc"); + EXPECT_TRUE(extract("abc.gat", &map)); + EXPECT_EQ(map, "abc"); + EXPECT_TRUE(extract("abcdefghijklmno", &map)); + EXPECT_EQ(map, "abcdefghijklmno"); + EXPECT_TRUE(extract("abcdefghijklmno.gat", &map)); + EXPECT_EQ(map, "abcdefghijklmno"); +} -- cgit v1.2.3-60-g2f50