Files
wren/test/meta/get_module_variables.wren
Bob Nystrom c367fc3bfc Get logical imports in "wren_modules" working.
There's a lot of changes here and surely some rough edges to iron out.
Also, I need to update the docs. But I want to get closer to landing
this so I can build on it.
2018-07-15 20:09:41 -07:00

18 lines
529 B
Plaintext

import "meta" for Meta
var variables = Meta.getModuleVariables("./test/meta/get_module_variables")
// Includes implicitly imported core stuff.
System.print(variables.contains("Object")) // expect: true
System.print(variables.contains("Bool")) // expect: true
// Includes top level variables.
System.print(variables.contains("variables")) // expect: true
// Even ones declared later.
System.print(variables.contains("later")) // expect: true
var later = "values"
System.print(variables.contains("unknown")) // expect: false