mirror of
https://github.com/mikefarah/yq.git
synced 2025-01-12 11:05:37 +00:00
Bumping goccy
This commit is contained in:
parent
31ad7fbaa2
commit
0f390b27aa
2
.gitignore
vendored
2
.gitignore
vendored
@ -44,6 +44,8 @@ test*.yml
|
||||
test*.xml
|
||||
test*.toml
|
||||
test*.yaml
|
||||
test_dir1/
|
||||
test_dir2/
|
||||
0.yml
|
||||
1.yml
|
||||
2.yml
|
||||
|
@ -207,21 +207,21 @@ EOM
|
||||
|
||||
testSplitWithDirectories() {
|
||||
cat >test.yml <<EOL
|
||||
f: test_dir1/file1
|
||||
f: test_dir1/test_file1
|
||||
---
|
||||
f: test_dir2/dir22/file2
|
||||
f: test_dir2/dir22/test_file2
|
||||
---
|
||||
f: file3
|
||||
f: test_file3
|
||||
EOL
|
||||
|
||||
./yq e --no-doc -s ".f" test.yml
|
||||
|
||||
doc1=$(cat test_dir1/file1.yml)
|
||||
assertEquals "f: test_dir1/file1" "$doc1"
|
||||
doc2=$(cat test_dir2/dir22/file2.yml)
|
||||
assertEquals "f: test_dir2/dir22/file2" "$doc2"
|
||||
doc3=$(cat file3.yml)
|
||||
assertEquals "f: file3" "$doc3"
|
||||
doc1=$(cat test_dir1/test_file1.yml)
|
||||
assertEquals "f: test_dir1/test_file1" "$doc1"
|
||||
doc2=$(cat test_dir2/dir22/test_file2.yml)
|
||||
assertEquals "f: test_dir2/dir22/test_file2" "$doc2"
|
||||
doc3=$(cat test_file3.yml)
|
||||
assertEquals "f: test_file3" "$doc3"
|
||||
}
|
||||
|
||||
source ./scripts/shunit2
|
||||
|
2
go.mod
2
go.mod
@ -8,7 +8,7 @@ require (
|
||||
github.com/elliotchance/orderedmap v1.7.1
|
||||
github.com/fatih/color v1.18.0
|
||||
github.com/goccy/go-json v0.10.4
|
||||
github.com/goccy/go-yaml v1.13.0
|
||||
github.com/goccy/go-yaml v1.13.3
|
||||
github.com/jinzhu/copier v0.4.0
|
||||
github.com/magiconair/properties v1.8.9
|
||||
github.com/pelletier/go-toml/v2 v2.2.3
|
||||
|
4
go.sum
4
go.sum
@ -26,8 +26,8 @@ github.com/go-playground/validator/v10 v10.22.1 h1:40JcKH+bBNGFczGuoBYgX4I6m/i27
|
||||
github.com/go-playground/validator/v10 v10.22.1/go.mod h1:dbuPbCMFw/DrkbEynArYaCwl3amGuJotoKCe95atGMM=
|
||||
github.com/goccy/go-json v0.10.4 h1:JSwxQzIqKfmFX1swYPpUThQZp/Ka4wzJdK0LWVytLPM=
|
||||
github.com/goccy/go-json v0.10.4/go.mod h1:oq7eo15ShAhp70Anwd5lgX2pLfOS3QCiwU/PULtXL6M=
|
||||
github.com/goccy/go-yaml v1.13.0 h1:0Wtp0FZLd7Sm8gERmR9S6Iczzb3vItJj7NaHmFg8pTs=
|
||||
github.com/goccy/go-yaml v1.13.0/go.mod h1:IjYwxUiJDoqpx2RmbdjMUceGHZwYLon3sfOGl5Hi9lc=
|
||||
github.com/goccy/go-yaml v1.13.3 h1:IXRULR8mAa0MXQobzzp0VOfMUJ8EnaQ4x3jhf7S0/nI=
|
||||
github.com/goccy/go-yaml v1.13.3/go.mod h1:IjYwxUiJDoqpx2RmbdjMUceGHZwYLon3sfOGl5Hi9lc=
|
||||
github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
|
||||
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
|
||||
github.com/hexops/gotextdiff v1.0.3 h1:gitA9+qJrrTCsiCl7+kh75nPqQt1cx4ZkudSTLoUqJM=
|
||||
|
@ -20,17 +20,11 @@ var goccyYamlFormatScenarios = []formatScenario{
|
||||
expected: "3.1\n",
|
||||
},
|
||||
{
|
||||
description: "basic - 3.1",
|
||||
description: "basic - mike",
|
||||
skipDoc: true,
|
||||
input: "mike: 3",
|
||||
expected: "mike: 3\n",
|
||||
},
|
||||
{
|
||||
description: "basic - 3.1",
|
||||
skipDoc: true,
|
||||
input: "{mike: 3}",
|
||||
expected: "{mike: 3}\n",
|
||||
},
|
||||
{
|
||||
description: "basic - map multiple entries",
|
||||
skipDoc: true,
|
||||
@ -44,19 +38,19 @@ var goccyYamlFormatScenarios = []formatScenario{
|
||||
expected: "{mike: 3}\n",
|
||||
},
|
||||
{
|
||||
description: "basic - 3.1",
|
||||
description: "basic - tag with number",
|
||||
skipDoc: true,
|
||||
input: "mike: !!cat 3",
|
||||
expected: "mike: !!cat 3\n",
|
||||
},
|
||||
{
|
||||
description: "basic - 3.1",
|
||||
description: "basic - array of numbers",
|
||||
skipDoc: true,
|
||||
input: "- 3",
|
||||
expected: "- 3\n",
|
||||
},
|
||||
{
|
||||
description: "basic - 3.1",
|
||||
description: "basic - single line array",
|
||||
skipDoc: true,
|
||||
input: "[3]",
|
||||
expected: "[3]\n",
|
||||
|
Loading…
Reference in New Issue
Block a user