Skip to content

Commit 0f390b2

Browse files
committed
Bumping goccy
1 parent 31ad7fb commit 0f390b2

File tree

5 files changed

+19
-23
lines changed

5 files changed

+19
-23
lines changed

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ test*.yml
4444
test*.xml
4545
test*.toml
4646
test*.yaml
47+
test_dir1/
48+
test_dir2/
4749
0.yml
4850
1.yml
4951
2.yml

acceptance_tests/split-printer.sh

+9-9
Original file line numberDiff line numberDiff line change
@@ -207,21 +207,21 @@ EOM
207207

208208
testSplitWithDirectories() {
209209
cat >test.yml <<EOL
210-
f: test_dir1/file1
210+
f: test_dir1/test_file1
211211
---
212-
f: test_dir2/dir22/file2
212+
f: test_dir2/dir22/test_file2
213213
---
214-
f: file3
214+
f: test_file3
215215
EOL
216216

217217
./yq e --no-doc -s ".f" test.yml
218218

219-
doc1=$(cat test_dir1/file1.yml)
220-
assertEquals "f: test_dir1/file1" "$doc1"
221-
doc2=$(cat test_dir2/dir22/file2.yml)
222-
assertEquals "f: test_dir2/dir22/file2" "$doc2"
223-
doc3=$(cat file3.yml)
224-
assertEquals "f: file3" "$doc3"
219+
doc1=$(cat test_dir1/test_file1.yml)
220+
assertEquals "f: test_dir1/test_file1" "$doc1"
221+
doc2=$(cat test_dir2/dir22/test_file2.yml)
222+
assertEquals "f: test_dir2/dir22/test_file2" "$doc2"
223+
doc3=$(cat test_file3.yml)
224+
assertEquals "f: test_file3" "$doc3"
225225
}
226226

227227
source ./scripts/shunit2

go.mod

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ require (
88
github.com/elliotchance/orderedmap v1.7.1
99
github.com/fatih/color v1.18.0
1010
github.com/goccy/go-json v0.10.4
11-
github.com/goccy/go-yaml v1.13.0
11+
github.com/goccy/go-yaml v1.13.3
1212
github.com/jinzhu/copier v0.4.0
1313
github.com/magiconair/properties v1.8.9
1414
github.com/pelletier/go-toml/v2 v2.2.3

go.sum

+2-2
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ github.com/go-playground/validator/v10 v10.22.1 h1:40JcKH+bBNGFczGuoBYgX4I6m/i27
2626
github.com/go-playground/validator/v10 v10.22.1/go.mod h1:dbuPbCMFw/DrkbEynArYaCwl3amGuJotoKCe95atGMM=
2727
github.com/goccy/go-json v0.10.4 h1:JSwxQzIqKfmFX1swYPpUThQZp/Ka4wzJdK0LWVytLPM=
2828
github.com/goccy/go-json v0.10.4/go.mod h1:oq7eo15ShAhp70Anwd5lgX2pLfOS3QCiwU/PULtXL6M=
29-
github.com/goccy/go-yaml v1.13.0 h1:0Wtp0FZLd7Sm8gERmR9S6Iczzb3vItJj7NaHmFg8pTs=
30-
github.com/goccy/go-yaml v1.13.0/go.mod h1:IjYwxUiJDoqpx2RmbdjMUceGHZwYLon3sfOGl5Hi9lc=
29+
github.com/goccy/go-yaml v1.13.3 h1:IXRULR8mAa0MXQobzzp0VOfMUJ8EnaQ4x3jhf7S0/nI=
30+
github.com/goccy/go-yaml v1.13.3/go.mod h1:IjYwxUiJDoqpx2RmbdjMUceGHZwYLon3sfOGl5Hi9lc=
3131
github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
3232
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
3333
github.com/hexops/gotextdiff v1.0.3 h1:gitA9+qJrrTCsiCl7+kh75nPqQt1cx4ZkudSTLoUqJM=

pkg/yqlib/goccy_yaml_test.go

+5-11
Original file line numberDiff line numberDiff line change
@@ -20,17 +20,11 @@ var goccyYamlFormatScenarios = []formatScenario{
2020
expected: "3.1\n",
2121
},
2222
{
23-
description: "basic - 3.1",
23+
description: "basic - mike",
2424
skipDoc: true,
2525
input: "mike: 3",
2626
expected: "mike: 3\n",
2727
},
28-
{
29-
description: "basic - 3.1",
30-
skipDoc: true,
31-
input: "{mike: 3}",
32-
expected: "{mike: 3}\n",
33-
},
3428
{
3529
description: "basic - map multiple entries",
3630
skipDoc: true,
@@ -40,23 +34,23 @@ var goccyYamlFormatScenarios = []formatScenario{
4034
{
4135
description: "basic - 3.1",
4236
skipDoc: true,
43-
input: "{\nmike: 3\n}",
37+
input: "{\n mike: 3\n}",
4438
expected: "{mike: 3}\n",
4539
},
4640
{
47-
description: "basic - 3.1",
41+
description: "basic - tag with number",
4842
skipDoc: true,
4943
input: "mike: !!cat 3",
5044
expected: "mike: !!cat 3\n",
5145
},
5246
{
53-
description: "basic - 3.1",
47+
description: "basic - array of numbers",
5448
skipDoc: true,
5549
input: "- 3",
5650
expected: "- 3\n",
5751
},
5852
{
59-
description: "basic - 3.1",
53+
description: "basic - single line array",
6054
skipDoc: true,
6155
input: "[3]",
6256
expected: "[3]\n",

0 commit comments

Comments
 (0)