Skip to content

Commit

Permalink
test(gno.land): time-simple.txtar (gnolang#2111)
Browse files Browse the repository at this point in the history
This PR adds a simple regression test for a bug that was introduced in
gnolang#1702 and fixed in
gnolang#2105 .

Signed-off-by: Jeff Thompson <[email protected]>
  • Loading branch information
jefft0 authored and leohhhn committed May 21, 2024
1 parent 79942cf commit 144fa3a
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions gno.land/cmd/gnoland/testdata/time-simple.txtar
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Originally, the addpkg failed due to changes in PR https://github.com/gnolang/gno/pull/1702 .
# This bug was fixed with https://github.com/gnolang/gno/pull/2105 .

gnoland start

gnokey maketx addpkg -pkgdir $WORK -pkgpath gno.land/r/time_simple -gas-fee 1ugnot -gas-wanted 10000000 -broadcast -chainid=tendermint_test test1
stdout OK!

-- time_simple.gno --
package time_simple

import (
"time"
)

func GetUnixTime() int64 {
return time.Now().Unix()
}

0 comments on commit 144fa3a

Please sign in to comment.