mirror of
https://github.com/claunia/plist-cil.git
synced 2025-12-16 19:14:26 +00:00
Add NS.string as primitive
This commit is contained in:
@@ -53,5 +53,21 @@ namespace plistcil.test
|
|||||||
writer.Write(root);
|
writer.Write(root);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Fact]
|
||||||
|
public void Roundtrip4Test()
|
||||||
|
{
|
||||||
|
byte[] data = File.ReadAllBytes("test-files/plist4.bin");
|
||||||
|
NSObject root = PropertyListParser.Parse(data);
|
||||||
|
|
||||||
|
using (MemoryStream actualOutput = new MemoryStream())
|
||||||
|
using (Stream expectedOutput = File.OpenRead("test-files/plist4.bin"))
|
||||||
|
using (ValidatingStream validatingStream = new ValidatingStream(actualOutput, expectedOutput))
|
||||||
|
{
|
||||||
|
BinaryPropertyListWriter writer = new BinaryPropertyListWriter(validatingStream);
|
||||||
|
writer.ReuseObjectIds = false;
|
||||||
|
writer.Write(root);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -122,6 +122,9 @@
|
|||||||
<None Update="test-files\plist3.bin">
|
<None Update="test-files\plist3.bin">
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
</None>
|
</None>
|
||||||
|
<None Update="test-files\plist4.bin">
|
||||||
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
|
</None>
|
||||||
<None Update="test-files\RoundtripBinaryIndentation.plist">
|
<None Update="test-files\RoundtripBinaryIndentation.plist">
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
</None>
|
</None>
|
||||||
|
|||||||
BIN
plist-cil.test/test-files/plist4.bin
Normal file
BIN
plist-cil.test/test-files/plist4.bin
Normal file
Binary file not shown.
@@ -424,6 +424,7 @@ namespace Claunia.PropertyList
|
|||||||
|| content == "NS.keys"
|
|| content == "NS.keys"
|
||||||
|| content == "NS.base"
|
|| content == "NS.base"
|
||||||
|| content == "NS.relative"
|
|| content == "NS.relative"
|
||||||
|
|| content == "NS.string"
|
||||||
|| content == "NSURL"
|
|| content == "NSURL"
|
||||||
|| content == "NSDictionary"
|
|| content == "NSDictionary"
|
||||||
|| content == "NSObject"
|
|| content == "NSObject"
|
||||||
|
|||||||
Reference in New Issue
Block a user