public void ParseEscapedSpacesTest() { DependencyParser parser = new DependencyParser(); parser.Parse(@"test.o: test.c my\ test.h my\ \test.h"); List<string> expected = new List<string>(); expected.Add(@"test.c"); expected.Add(@"my test.h"); expected.Add(@"my \test.h"); CollectionAssert.AreEquivalent(expected, parser.Dependencies); }
public void ParseMultiLineTest() { DependencyParser parser = new DependencyParser(); parser.Parse("test.o: test.c \\\n foo.h\\\n bar.h baz.h"); List<string> expected = new List<string>(); expected.Add(@"test.c"); expected.Add(@"foo.h"); expected.Add(@"bar.h"); expected.Add(@"baz.h"); CollectionAssert.AreEquivalent(expected, parser.Dependencies); }