-
-
Notifications
You must be signed in to change notification settings - Fork 87
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of https://github.com/aloneguid/config
- Loading branch information
Showing
9 changed files
with
123 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
name: Release | ||
|
||
env: | ||
v: '5.1.2' | ||
v: '5.1.3' | ||
av: '5.0.0' | ||
pv: '5.1.2' | ||
pv: '5.1.3' | ||
|
||
on: | ||
push: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
src/Config.Net.Tests/Stores/Formats/StructuredIniFileTest.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
using System; | ||
using System.IO; | ||
using System.Text; | ||
using Config.Net.Stores.Formats.Ini; | ||
using Xunit; | ||
|
||
namespace Config.Net.Tests.Stores.Formats | ||
{ | ||
public class StructuredIniFileTest : AbstractTestFixture | ||
{ | ||
[Fact] | ||
public void WriteInlineCommentWithNewLine() | ||
{ | ||
string fullPath = Path.Combine(TestDir.FullName, Guid.NewGuid() + ".ini"); | ||
string content = @"key=value ;c1\r\nc2 | ||
"; | ||
|
||
StructuredIniFile file; | ||
using (Stream input = new MemoryStream(Encoding.UTF8.GetBytes(content))) | ||
{ | ||
file = StructuredIniFile.ReadFrom(input, true, true); | ||
} | ||
|
||
using (Stream output = File.OpenWrite(fullPath)) | ||
{ | ||
file.WriteTo(output); | ||
} | ||
|
||
string resultText = File.ReadAllText(fullPath); | ||
Assert.Equal(content, resultText); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters