Skip to content

Commit

Permalink
Set lineending for INTERLIS files
Browse files Browse the repository at this point in the history
  • Loading branch information
patrickackermann committed Jul 18, 2024
1 parent e7ba729 commit 4bd98db
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
3 changes: 3 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -76,3 +76,6 @@

# *nix shell scripts always use LF (see .editorconfig)
*.sh eol=lf

# INTERLIS files set to a fixed line ending to get consistent file hashes
*.ili text eol=lf
6 changes: 3 additions & 3 deletions tests/RepositoryCrawlerTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -286,8 +286,8 @@ public async Task CrawlerCompletesMissingMD5()
.AssertSingleItem(m => m.Name == "Test_Model_Without_MD5_And_Invalid_File", m => Assert.AreEqual(null, m.MD5))
.AssertSingleItem(m => m.Name == "Test_Model_With_Correct_MD5", m => Assert.AreEqual("eb137f3b28d3d06c41f20237886a8b41", m.MD5))
.AssertSingleItem(m => m.Name == "Test_Model_With_Wrong_MD5", m => Assert.AreEqual("85d9577a5d8d9115484cdf2c0917c802", m.MD5))
.AssertSingleItem(m => m.Name == "TwoModelsInOneFile_Model1", m => Assert.AreEqual("3e2885ffd8ff860628de353d14fcfac6", m.MD5))
.AssertSingleItem(m => m.Name == "TwoModelsInOneFile_Model2", m => Assert.AreEqual("3e2885ffd8ff860628de353d14fcfac6", m.MD5));
.AssertSingleItem(m => m.Name == "TwoModelsInOneFile_Model1", m => Assert.AreEqual("17dd3681a880848baef146904991c36b", m.MD5))
.AssertSingleItem(m => m.Name == "TwoModelsInOneFile_Model2", m => Assert.AreEqual("17dd3681a880848baef146904991c36b", m.MD5));
});
}

Expand All @@ -314,7 +314,7 @@ public async Task CrawlerUsesExistingFile()
result.AssertCount(1).Single().Value.Models.AssertCount(7);

var expectedContent = "Expected Content NISECTIOUSIS";
await repositoryCrawler.FetchInterlisFiles([new InterlisFile { MD5 = "3E2885FFD8FF860628DE353D14FCFAC6", Content = expectedContent }], result.Values);
await repositoryCrawler.FetchInterlisFiles([new InterlisFile { MD5 = "17DD3681A880848BAEF146904991C36B", Content = expectedContent }], result.Values);
Assert.IsNotNull(result);
result.AssertCount(1);

Expand Down
4 changes: 2 additions & 2 deletions tests/Testdata/models.multiparent.testdata/ilimodels.xml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
<Version>2024_07_18</Version>
<NameLanguage>en</NameLanguage>
<publishingDate>2024-07-18</publishingDate>
<md5>3e2885ffd8ff860628de353d14fcfac6</md5>
<md5>17dd3681a880848baef146904991c36b</md5>
</IliRepository20.RepositoryIndex.ModelMetadata>
<IliRepository20.RepositoryIndex.ModelMetadata TID="5419">
<Name>TwoModelsInOneFile_Model2</Name>
Expand All @@ -67,7 +67,7 @@
<Version>2024_07_18</Version>
<NameLanguage>en</NameLanguage>
<publishingDate>2024-07-18</publishingDate>
<md5>3e2885ffd8ff860628de353d14fcfac6</md5>
<md5>17dd3681a880848baef146904991c36b</md5>
</IliRepository20.RepositoryIndex.ModelMetadata>
</IliRepository09.RepositoryIndex>
</DATASECTION>
Expand Down

0 comments on commit 4bd98db

Please sign in to comment.