summaryrefslogtreecommitdiff
path: root/src/common/extract_test.cpp
diff options
context:
space:
mode:
authorBen Longbons <b.r.longbons@gmail.com>2013-08-27 19:05:36 -0700
committerBen Longbons <b.r.longbons@gmail.com>2013-08-27 19:05:36 -0700
commit61dc59e612df9c6d2b3a3f4f27f1cb88b6fca98b (patch)
tree875a8e14d67011434cbd4ceb5bf435971d94e0d4 /src/common/extract_test.cpp
parente8880ef4d8c00de91f72e7aa2d75b05abdecdafb (diff)
downloadtmwa-61dc59e612df9c6d2b3a3f4f27f1cb88b6fca98b.tar.gz
tmwa-61dc59e612df9c6d2b3a3f4f27f1cb88b6fca98b.tar.bz2
tmwa-61dc59e612df9c6d2b3a3f4f27f1cb88b6fca98b.tar.xz
tmwa-61dc59e612df9c6d2b3a3f4f27f1cb88b6fca98b.zip
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.
Diffstat (limited to 'src/common/extract_test.cpp')
-rw-r--r--src/common/extract_test.cpp13
1 files changed, 13 insertions, 0 deletions
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");
+}