Skip to content

Commit cff67fe

Browse files
committed
Fix
1 parent dd57a97 commit cff67fe

33 files changed

Lines changed: 533 additions & 226 deletions

ValveKeyValue/ValveKeyValue.Test/KVValueToStringTestCase.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
using System.Collections;
2+
using System.Linq;
23

34
namespace ValveKeyValue.Test
45
{

ValveKeyValue/ValveKeyValue.Test/Test Data/TextKV3/array_from_kv1.kv3

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,36 +5,36 @@
55
"1" = "b"
66
}
77
arrayOnSingleLine = {
8-
"0" = 16.7551
9-
"1" = 20.3763
10-
"2" = 19.6448
8+
"0" = 16.755100
9+
"1" = 20.376300
10+
"2" = 19.644800
1111
}
1212
arrayNoSpace = {
13-
"0" = 1.3763
14-
"1" = 19.6448
13+
"0" = 1.376300
14+
"1" = 19.644800
1515
}
1616
arrayMixedTypes = {
1717
"0" = "a"
18-
"1" = "1"
18+
"1" = 1
1919
"2" = "True"
2020
"3" = "False"
2121
"4" = ""
2222
"5" = {
2323
foo = "bar"
2424
}
2525
"6" = {
26-
"0" = "1"
27-
"1" = "3"
28-
"2" = "3"
29-
"3" = "7"
26+
"0" = 1
27+
"1" = 3
28+
"2" = 3
29+
"3" = 7
3030
}
3131
"7" = "11 FF"
3232
"8" = "hello.world"
3333
"9" = """
3434
multiline
3535
string
3636
"""
37-
"10" = -69.42
37+
"10" = -69.420000
3838
}
3939
test = "success"
4040
test = "success"

ValveKeyValue/ValveKeyValue.Test/Test Data/TextKV3/array_kv1.vdf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
"root"
1+
""
22
{
33
"arrayValue"
44
{

ValveKeyValue/ValveKeyValue.Test/Test Data/TextKV3/array_serialized.kv3

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@
55
"b",
66
]
77
arrayOnSingleLine = [
8-
16.7551,
9-
20.3763,
10-
19.6448,
8+
16.755100,
9+
20.376300,
10+
19.644800,
1111
]
1212
arrayNoSpace = [
13-
1.3763,
14-
19.6448,
13+
1.376300,
14+
19.644800,
1515
]
1616
arrayMixedTypes = [
1717
"a",
@@ -36,7 +36,7 @@
3636
multiline
3737
string
3838
""",
39-
-69.42,
39+
-69.420000,
4040
]
4141
test = "success"
4242
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<!-- kv3 encoding:text:version{e21c7f3c-8a33-41c5-9977-a76d3a32aa0d} format:generic:version{7412167c-06e9-4698-aff2-e63eb59037e7} -->
2+
{
3+
name = entity_name:"some_entity"
4+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<!-- kv3 encoding:text:version{e21c7f3c-8a33-41c5-9977-a76d3a32aa0d} format:generic:version{7412167c-06e9-4698-aff2-e63eb59037e7} -->
2+
{
3+
newline = "hello\nworld"
4+
tab = "hello\tworld"
5+
backslash = "hello\\world"
6+
quote = "hello\"world"
7+
combined = "line1\nline2\ttab\\slash\"quote"
8+
}

ValveKeyValue/ValveKeyValue.Test/Test Data/TextKV3/flagged_value_from_kv1.kv3

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
foo = "bar"
44
bar = "foo"
55
uppercase = "foo"
6-
flaggedNumber = "-1234"
6+
flaggedNumber = -1234
77
multipleFlags = "cool value"
88
soundEvent = "event sound"
9-
noFlags = "5"
9+
noFlags = 5
1010
flaggedObject = {
1111
"1" = "test1"
1212
"2" = "test2"

ValveKeyValue/ValveKeyValue.Test/Test Data/TextKV3/flagged_value_kv1.vdf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
"root"
1+
""
22
{
33
"foo" "bar"
44
"bar" "foo"

ValveKeyValue/ValveKeyValue.Test/Test Data/TextKV3/flagged_value_serialized.kv3

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
bar = resource:"foo"
55
uppercase = resource:"foo"
66
flaggedNumber = panorama:-1234
7-
multipleFlags = resource|resource_name|subclass:"cool value"
7+
multipleFlags = subclass:"cool value"
88
soundEvent = soundevent:"event sound"
99
noFlags = 5
1010
flaggedObject = panorama:{

ValveKeyValue/ValveKeyValue.Test/Test Data/TextKV3/multiline.kv3

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ First line of a multi-line string literal.
55
Second line of a multi-line string literal.
66
"""
77
multiLineWithQuotesInside = """
8-
hmm this """is awkward
8+
hmm this \"""is awkward
99
\""" yes
1010
"""
1111
singleQuotesButWithNewLineAnyway = "hello

0 commit comments

Comments
 (0)