summary refs log tree commit diff stats
path: root/tests/js/tfloatround.nim
blob: 7bc5430e61ab6256adc32f9432e14793e2e85358 (plain) (blame)
1
2
3
4
5
6
7
discard """
  output: '''
3
'''
"""

echo int(22 / 7)
pan> main import ( "os" "golang.org/x/sys/unix" "tildegit.org/andinus/lynx" ) func main() { err := unix.PledgePromises("unveil stdio rpath") panicOnErr(err) unveil() // Drop unveil from promises. err = unix.PledgePromises("stdio rpath") panicOnErr(err) grus() } func unveil() { paths := make(map[string]string) paths["/usr/share/dict"] = "r" paths["/usr/local/share/dict"] = "r" // Unveil user defined dictionaries. if len(os.Args) >= 3 { for _, dict := range os.Args[2:] { paths[dict] = "r" } } // This will not return error if the file doesn't exist. err := lynx.UnveilPaths(paths) panicOnErr(err) // Block further unveil calls. err = lynx.UnveilBlock() panicOnErr(err) }