Skip to content

Commit

Permalink
test(gno.land): time-simple.txtar (#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
#1702 and fixed in
#2105 .

Signed-off-by: Jeff Thompson <jeff@thefirst.org>
  • Loading branch information
jefft0 authored May 15, 2024
1 parent a3a9b56 commit ab3d7f1
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 ab3d7f1

Please sign in to comment.