Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

[Tests] Add test for setting alternative list seperator

  • Loading branch information...
commit 150220bb0f26bdcc84e0a282f752c632dbc49ce4 1 parent f3cbaca
@lamalex lamalex authored
View
15 GKeyFile/Tests/src/GKeyFileTests.cs
@@ -34,13 +34,14 @@ public class GKeyFileTests
{
const string TEST_FILE_NAME = "test-keyfile.keyfile";
+ string test_file_name;
GKeyFile test_keyfile;
[SetUp]
public void Init ()
{
- string testFile = new [] {Environment.CurrentDirectory, "..", "..", "src", TEST_FILE_NAME}.Aggregate (Path.Combine);
- test_keyfile = new GKeyFile (testFile);
+ test_file_name = new [] {Environment.CurrentDirectory, "..", "..", "src", TEST_FILE_NAME}.Aggregate (Path.Combine);
+ test_keyfile = new GKeyFile (test_file_name);
}
/*
@@ -118,4 +119,14 @@ public void GetDoubleList ()
CollectionAssert.AreEqual (expected, test_keyfile.GetDoubleList ("Group1", "DoubleList"));
}
+
+ [Test]
+ public void GetNonstandardSeperatorStringList ()
+ {
+ GKeyFile keyFile = new GKeyFile (test_file_name);
+ string [] expected = new string [] { "one one", "two", "threee", "for" };
+ keyFile.ListSeparator = ":";
+
+ CollectionAssert.AreEqual (expected, keyFile.GetStringList ("Group1", "NonSemicolonStringList"));
+ }
}
View
1  GKeyFile/Tests/src/test-keyfile.keyfile
@@ -16,3 +16,4 @@ StringList=one;two;three;four
BoolList=true;false;false;true
IntegerList=0;1;2;04;-5
DoubleList=10;10.3;46.3;-0.8
+NonSemicolonStringList=one one:two:threee:for
Please sign in to comment.
Something went wrong with that request. Please try again.