Skip to content

Commit

Permalink
Fix: Some file tests that should have failed always pass in Github re…
Browse files Browse the repository at this point in the history
…po. (#441)

* fix parsed comment new lines.

* updated pkg address and realm object hashes

Co-authored-by: piux2 <>
  • Loading branch information
piux2 authored Dec 29, 2022
1 parent 33073cc commit cabc1ad
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 39 deletions.
11 changes: 4 additions & 7 deletions examples/gno.land/r/demo/releases-example/releases0_filetest.gno
Original file line number Diff line number Diff line change
Expand Up @@ -7,33 +7,31 @@ import (
func main() {
println("-----------")
changelog := releases.NewChangelog("example")
println(changelog.Render(""))
print(changelog.Render(""))

println("-----------")
changelog.NewRelease("v1", "r/blahblah", "* initial version")
println(changelog.Render(""))
print(changelog.Render(""))

println("-----------")
changelog.NewRelease("v2", "r/blahblah2", "* various improvements\n* new shiny logo")
println(changelog.Render(""))
print(changelog.Render(""))

println("-----------")
println(changelog.Latest().Render())
print(changelog.Latest().Render())
}

// Output:
// -----------
// # example
//
//
// -----------
// # example
//
// ## [example v1 (latest)](r/blahblah)
//
// * initial version
//
//
// -----------
// # example
//
Expand All @@ -46,7 +44,6 @@ func main() {
//
// * initial version
//
//
// -----------
// ## [example v2 (latest)](r/blahblah2)
//
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ import (

func main() {
println("-----------")
println(releases_example.Render(""))
print(releases_example.Render(""))

println("-----------")
println(releases_example.Render("v1"))
print(releases_example.Render("v1"))

println("-----------")
println(releases_example.Render("v42"))
print(releases_example.Render("v42"))
}

// Output:
Expand All @@ -27,12 +27,10 @@ func main() {
//
// initial release
//
//
// -----------
// ## [example-app v1](r/demo/examples-example-v1)
//
// initial release
//
//
// -----------
// no such release
2 changes: 1 addition & 1 deletion tests/files2/std7.gno
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,5 @@ func main() {

// Output:
// g17rgsdnfxzza0sdfsdma37sdwxagsz378833ca4
// g1q36x40upm0val7mkzrp5e7a3kxg7cgm548s8v8
// g1ssrgtfce6pzs8tp7s6y8473yrffqs9xlgntk0h
// g17rgsdnfxzza0sdfsdma37sdwxagsz378833ca4
4 changes: 2 additions & 2 deletions tests/files2/zrealm_example.gno
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ func main() {
// },
// "V": {
// "@type": "/gno.RefValue",
// "Hash": "5653e91a35a4ca99b867b252a7abed830e0b0176",
// "Hash": "17d8942d7808bf68ebf3a44ded796cf98031b975",
// "ObjectID": "1ffd45e074aa1b8df562907c95ad97526b7ca187:6"
// }
// }
Expand Down Expand Up @@ -170,7 +170,7 @@ func main() {
// },
// "V": {
// "@type": "/gno.RefValue",
// "Hash": "bf03d2da4a2ff95f95923b08be9e4262ab2c5ac9",
// "Hash": "57560e3337ccc89dec8e82602250e71e00b10a29",
// "ObjectID": "1ffd45e074aa1b8df562907c95ad97526b7ca187:5"
// }
// }
Expand Down
48 changes: 24 additions & 24 deletions tests/files2/zrealm_tests0.gno
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ func main() {

// Realm:
// switchrealm["gno.land/r/demo/tests"]
// c[adc8ca1e1018f3da5f2caaf455c39e10cc1284db:10]={
// c[0ffe7732b4d549b4cf9ec18bd68641cd2c75ad0a:10]={
// "Fields": [
// {
// "T": {
Expand All @@ -37,13 +37,13 @@ func main() {
// }
// ],
// "ObjectInfo": {
// "ID": "adc8ca1e1018f3da5f2caaf455c39e10cc1284db:10",
// "ID": "0ffe7732b4d549b4cf9ec18bd68641cd2c75ad0a:10",
// "ModTime": "0",
// "OwnerID": "adc8ca1e1018f3da5f2caaf455c39e10cc1284db:9",
// "OwnerID": "0ffe7732b4d549b4cf9ec18bd68641cd2c75ad0a:9",
// "RefCount": "1"
// }
// }
// c[adc8ca1e1018f3da5f2caaf455c39e10cc1284db:9]={
// c[0ffe7732b4d549b4cf9ec18bd68641cd2c75ad0a:9]={
// "Data": null,
// "List": [
// {
Expand All @@ -65,8 +65,8 @@ func main() {
// },
// "V": {
// "@type": "/gno.RefValue",
// "Hash": "40af94627050bc75188e7e3bb27ad1f531552093",
// "ObjectID": "adc8ca1e1018f3da5f2caaf455c39e10cc1284db:6"
// "Hash": "94c14b2efc4bb2f3c24ee42292f161fd1ebd72a3",
// "ObjectID": "0ffe7732b4d549b4cf9ec18bd68641cd2c75ad0a:6"
// }
// }
// }
Expand All @@ -90,8 +90,8 @@ func main() {
// },
// "V": {
// "@type": "/gno.RefValue",
// "Hash": "ad44c3b08de7a27be4e1582353e4dbd0e371ef37",
// "ObjectID": "adc8ca1e1018f3da5f2caaf455c39e10cc1284db:8"
// "Hash": "1e36da78d1dc72e5cbac56c27590332574c89678",
// "ObjectID": "0ffe7732b4d549b4cf9ec18bd68641cd2c75ad0a:8"
// }
// }
// }
Expand All @@ -115,24 +115,24 @@ func main() {
// },
// "V": {
// "@type": "/gno.RefValue",
// "Hash": "7c642db97643cd0efa50d6a3387d05273c9e90bf",
// "ObjectID": "adc8ca1e1018f3da5f2caaf455c39e10cc1284db:10"
// "Hash": "43b13870b750f78cda919fa13a5d955d297242bd",
// "ObjectID": "0ffe7732b4d549b4cf9ec18bd68641cd2c75ad0a:10"
// }
// }
// }
// }
// ],
// "ObjectInfo": {
// "ID": "adc8ca1e1018f3da5f2caaf455c39e10cc1284db:9",
// "ID": "0ffe7732b4d549b4cf9ec18bd68641cd2c75ad0a:9",
// "ModTime": "0",
// "OwnerID": "adc8ca1e1018f3da5f2caaf455c39e10cc1284db:2",
// "OwnerID": "0ffe7732b4d549b4cf9ec18bd68641cd2c75ad0a:2",
// "RefCount": "1"
// }
// }
// u[adc8ca1e1018f3da5f2caaf455c39e10cc1284db:2]={
// u[0ffe7732b4d549b4cf9ec18bd68641cd2c75ad0a:2]={
// "Blank": {},
// "ObjectInfo": {
// "ID": "adc8ca1e1018f3da5f2caaf455c39e10cc1284db:2",
// "ID": "0ffe7732b4d549b4cf9ec18bd68641cd2c75ad0a:2",
// "IsEscaped": true,
// "ModTime": "8",
// "RefCount": "3"
Expand Down Expand Up @@ -394,7 +394,7 @@ func main() {
// "Closure": {
// "@type": "/gno.RefValue",
// "Escaped": true,
// "ObjectID": "adc8ca1e1018f3da5f2caaf455c39e10cc1284db:3"
// "ObjectID": "0ffe7732b4d549b4cf9ec18bd68641cd2c75ad0a:3"
// },
// "FileName": "interfaces.gno",
// "IsMethod": false,
Expand Down Expand Up @@ -458,7 +458,7 @@ func main() {
// "Closure": {
// "@type": "/gno.RefValue",
// "Escaped": true,
// "ObjectID": "adc8ca1e1018f3da5f2caaf455c39e10cc1284db:3"
// "ObjectID": "0ffe7732b4d549b4cf9ec18bd68641cd2c75ad0a:3"
// },
// "FileName": "interfaces.gno",
// "IsMethod": false,
Expand Down Expand Up @@ -522,7 +522,7 @@ func main() {
// "Closure": {
// "@type": "/gno.RefValue",
// "Escaped": true,
// "ObjectID": "adc8ca1e1018f3da5f2caaf455c39e10cc1284db:4"
// "ObjectID": "0ffe7732b4d549b4cf9ec18bd68641cd2c75ad0a:4"
// },
// "FileName": "tests.gno",
// "IsMethod": false,
Expand Down Expand Up @@ -579,7 +579,7 @@ func main() {
// "Closure": {
// "@type": "/gno.RefValue",
// "Escaped": true,
// "ObjectID": "adc8ca1e1018f3da5f2caaf455c39e10cc1284db:4"
// "ObjectID": "0ffe7732b4d549b4cf9ec18bd68641cd2c75ad0a:4"
// },
// "FileName": "tests.gno",
// "IsMethod": false,
Expand Down Expand Up @@ -626,7 +626,7 @@ func main() {
// "Closure": {
// "@type": "/gno.RefValue",
// "Escaped": true,
// "ObjectID": "adc8ca1e1018f3da5f2caaf455c39e10cc1284db:4"
// "ObjectID": "0ffe7732b4d549b4cf9ec18bd68641cd2c75ad0a:4"
// },
// "FileName": "tests.gno",
// "IsMethod": false,
Expand Down Expand Up @@ -660,7 +660,7 @@ func main() {
// "Closure": {
// "@type": "/gno.RefValue",
// "Escaped": true,
// "ObjectID": "adc8ca1e1018f3da5f2caaf455c39e10cc1284db:4"
// "ObjectID": "0ffe7732b4d549b4cf9ec18bd68641cd2c75ad0a:4"
// },
// "FileName": "tests.gno",
// "IsMethod": false,
Expand Down Expand Up @@ -694,7 +694,7 @@ func main() {
// "Closure": {
// "@type": "/gno.RefValue",
// "Escaped": true,
// "ObjectID": "adc8ca1e1018f3da5f2caaf455c39e10cc1284db:4"
// "ObjectID": "0ffe7732b4d549b4cf9ec18bd68641cd2c75ad0a:4"
// },
// "FileName": "tests.gno",
// "IsMethod": false,
Expand Down Expand Up @@ -730,8 +730,8 @@ func main() {
// "@type": "/gno.SliceValue",
// "Base": {
// "@type": "/gno.RefValue",
// "Hash": "2338c6d54a0e93b23daebd4988eafe493e1824fa",
// "ObjectID": "adc8ca1e1018f3da5f2caaf455c39e10cc1284db:9"
// "Hash": "5e5535af7afef6f523a897c051944639ef56c057",
// "ObjectID": "0ffe7732b4d549b4cf9ec18bd68641cd2c75ad0a:9"
// },
// "Length": "3",
// "Maxcap": "3",
Expand Down Expand Up @@ -767,7 +767,7 @@ func main() {
// }
// ]
// }
// d[adc8ca1e1018f3da5f2caaf455c39e10cc1284db:7]
// d[0ffe7732b4d549b4cf9ec18bd68641cd2c75ad0a:7]
// switchrealm["gno.land/r/demo/tests_foo"]
// switchrealm["gno.land/r/demo/tests_foo"]
// switchrealm["gno.land/r/demo/tests_foo"]
Expand Down

0 comments on commit cabc1ad

Please sign in to comment.