1# Tests file ops builtins 2load("assert.star", "assert") 3 4 5def test(): 6 myname = "file_ops.star" 7 assert.true(rblf_file_exists(myname), "the file %s does exist" % myname) 8 assert.true(not rblf_file_exists("no_such_file"), "the file no_such_file does not exist") 9 files = rblf_wildcard("*.star") 10 assert.true(myname in files, "expected %s in %s" % (myname, files)) 11 # RBCDATADIR is set by the caller to the path where this file resides 12 files = rblf_wildcard("*.star", rblf_env.TEST_DATA_DIR) 13 assert.true(myname in files, "expected %s in %s" % (myname, files)) 14 files = rblf_wildcard("*.xxx") 15 assert.true(len(files) == 0, "expansion should be empty but contains %s" % files) 16 17 18test() 19