repo stringclasses 341
values | file_path stringlengths 29 173 | language stringclasses 2
values | file_type stringclasses 4
values | code stringlengths 2 1.66M | tokens int64 2 598k |
|---|---|---|---|---|---|
revvy02/rodeo | revvy02-rodeo-1c8b6e8/tests-new/adapters/lune/roblox/instance/methods/FindFirstAncestorOfClass.luau | luau | .luau | local roblox = require("@lune/roblox")
local Instance = roblox.Instance
local root = Instance.new("Folder")
local child = Instance.new("Model")
local nested = Instance.new("Tool")
local descendant = Instance.new("Part")
descendant.Parent = nested
nested.Parent = child
child.Parent = root
assert(descendant:FindFirstA... | 127 |
revvy02/rodeo | revvy02-rodeo-1c8b6e8/tests-new/adapters/lune/roblox/instance/methods/FindFirstAncestorWhichIsA.luau | luau | .luau | local roblox = require("@lune/roblox")
local Instance = roblox.Instance
local root = Instance.new("Folder")
local child = Instance.new("Model")
local nested = Instance.new("Tool")
local descendant = Instance.new("Part")
descendant.Parent = nested
nested.Parent = child
child.Parent = root
assert(descendant:FindFirstA... | 135 |
revvy02/rodeo | revvy02-rodeo-1c8b6e8/tests-new/adapters/lune/roblox/instance/methods/FindFirstChild.luau | luau | .luau | local roblox = require("@lune/roblox")
local Instance = roblox.Instance
local root = Instance.new("Folder")
local child = Instance.new("Model")
local nested = Instance.new("Tool")
local adjacent = Instance.new("Model")
local descendant = Instance.new("Part")
descendant.Parent = nested
nested.Parent = child
adjacent.P... | 125 |
revvy02/rodeo | revvy02-rodeo-1c8b6e8/tests-new/adapters/lune/roblox/instance/methods/FindFirstChildOfClass.luau | luau | .luau | local roblox = require("@lune/roblox")
local Instance = roblox.Instance
local root = Instance.new("Folder")
local child = Instance.new("Model")
local nested = Instance.new("Tool")
local adjacent = Instance.new("Model")
local descendant = Instance.new("Part")
descendant.Parent = nested
nested.Parent = child
adjacent.P... | 129 |
revvy02/rodeo | revvy02-rodeo-1c8b6e8/tests-new/adapters/lune/roblox/instance/methods/FindFirstChildWhichIsA.luau | luau | .luau | local roblox = require("@lune/roblox")
local Instance = roblox.Instance
local root = Instance.new("Folder")
local child = Instance.new("Model")
local nested = Instance.new("Tool")
local adjacent = Instance.new("Model")
local descendant = Instance.new("Part")
descendant.Parent = nested
nested.Parent = child
adjacent.P... | 137 |
revvy02/rodeo | revvy02-rodeo-1c8b6e8/tests-new/adapters/lune/roblox/instance/methods/GetChildren.luau | luau | .luau | local fs = require("@lune/fs")
local roblox = require("@lune/roblox")
local Instance = roblox.Instance
local modelFile = fs.readFile("tests/roblox/rbx-test-files/models/three-nested-folders/binary.rbxm")
local model = roblox.deserializeModel(modelFile)[1]
assert(#model:GetChildren() == 1)
local newChild = Instance.n... | 144 |
revvy02/rodeo | revvy02-rodeo-1c8b6e8/tests-new/adapters/lune/roblox/instance/methods/GetDebugId.luau | luau | .luau | local roblox = require("@lune/roblox")
local part = roblox.Instance.new("Part")
local id = part:GetDebugId()
assert(type(id) == "string", "GetDebugId should return a string")
assert(#id == 32, "GetDebugId should return a string with length 32")
assert(
string.match(id, "^[0-9A-Fa-f]+$"),
"GetDebugId should return a... | 99 |
revvy02/rodeo | revvy02-rodeo-1c8b6e8/tests-new/adapters/lune/roblox/instance/methods/GetDescendants.luau | luau | .luau | local fs = require("@lune/fs")
local roblox = require("@lune/roblox")
local Instance = roblox.Instance
local modelFile = fs.readFile("tests/roblox/rbx-test-files/models/three-nested-folders/binary.rbxm")
local model = roblox.deserializeModel(modelFile)[1]
assert(#model:GetDescendants() == 2)
local newChild = Instanc... | 150 |
revvy02/rodeo | revvy02-rodeo-1c8b6e8/tests-new/adapters/lune/roblox/instance/methods/GetFullName.luau | luau | .luau | local fs = require("@lune/fs")
local roblox = require("@lune/roblox")
local modelFile = fs.readFile("tests/roblox/rbx-test-files/models/three-nested-folders/binary.rbxm")
local model = roblox.deserializeModel(modelFile)[1]
local child = model:FindFirstChild("Parent")
assert(child ~= nil)
local descendant = child:Find... | 126 |
revvy02/rodeo | revvy02-rodeo-1c8b6e8/tests-new/adapters/lune/roblox/instance/methods/IsA.luau | luau | .luau | local roblox = require("@lune/roblox")
local Instance = roblox.Instance
local part = Instance.new("Part")
local workspace = Instance.new("Workspace")
-- Valid
assert(part:IsA("Part") == true)
assert(part:IsA("BasePart") == true)
assert(part:IsA("PVInstance") == true)
assert(part:IsA("Instance") == true)
assert(work... | 182 |
revvy02/rodeo | revvy02-rodeo-1c8b6e8/tests-new/adapters/lune/roblox/instance/methods/IsAncestorOf.luau | luau | .luau | local roblox = require("@lune/roblox")
local Instance = roblox.Instance
local root = Instance.new("Folder")
local child = Instance.new("Model")
local descendant = Instance.new("Part")
child.Parent = root
descendant.Parent = child
assert(not root:IsAncestorOf(root))
assert(not child:IsAncestorOf(root))
assert(not des... | 135 |
revvy02/rodeo | revvy02-rodeo-1c8b6e8/tests-new/adapters/lune/roblox/instance/methods/IsDescendantOf.luau | luau | .luau | local roblox = require("@lune/roblox")
local Instance = roblox.Instance
local root = Instance.new("Folder")
local child = Instance.new("Model")
local descendant = Instance.new("Part")
child.Parent = root
descendant.Parent = child
assert(not root:IsDescendantOf(root))
assert(child:IsDescendantOf(root))
assert(descend... | 137 |
revvy02/rodeo | revvy02-rodeo-1c8b6e8/tests-new/adapters/lune/roblox/instance/new.luau | luau | .luau | local roblox = require("@lune/roblox")
local Instance = roblox.Instance
-- Should not allow creating unknown classes
assert(not pcall(function()
Instance.new("asdf")
end))
-- Should be case sensitive
assert(not pcall(function()
Instance.new("part")
end))
-- Should allow "not creatable" tagged classes to be created... | 325 |
revvy02/rodeo | revvy02-rodeo-1c8b6e8/tests-new/adapters/lune/roblox/instance/properties.luau | luau | .luau | local roblox = require("@lune/roblox") :: any
local BrickColor = roblox.BrickColor
local Instance = roblox.Instance
local Vector3 = roblox.Vector3
local CFrame = roblox.CFrame
local Enum = roblox.Enum
local part = Instance.new("Part")
-- Primitive type properties should work (note that these are inherited from BasePa... | 474 |
revvy02/rodeo | revvy02-rodeo-1c8b6e8/tests-new/adapters/lune/roblox/instance/query/Attributes.luau | luau | .luau | local query = require("./tree")
local root = query.build()
-- Attribute presence
query.check(root, "[$Variety]", { "ModelA" })
query.check(root, "[$Nonexistent]", {})
-- String attribute equality is case-sensitive
query.check(root, "[$Variety = Fuji]", { "ModelA" })
query.check(root, "[$Variety = fuji]", {})
-- Nume... | 208 |
revvy02/rodeo | revvy02-rodeo-1c8b6e8/tests-new/adapters/lune/roblox/instance/query/Classes.luau | luau | .luau | local query = require("./tree")
local root = query.build()
-- Class selectors match via IsA, are case-sensitive, and return results in
-- preorder depth-first order. The receiver itself is never included.
query.check(root, "MeshPart", { "MeshA" })
query.check(root, "Part", { "RedTree", "PartC", "PartD" })
-- Unknown... | 142 |
revvy02/rodeo | revvy02-rodeo-1c8b6e8/tests-new/adapters/lune/roblox/instance/query/Properties.luau | luau | .luau | local query = require("./tree")
local root = query.build()
-- Property selectors compare against the effective value, falling back to the
-- class default when the property has not been explicitly set.
query.check(root, "[CanCollide = false]", { "RedTree" })
-- MeshA / PartC / PartD all keep the default CanCollide = ... | 178 |
revvy02/rodeo | revvy02-rodeo-1c8b6e8/tests-new/adapters/lune/roblox/instance/query/PseudoClasses.luau | luau | .luau | local query = require("./tree")
local root = query.build()
-- `:not(...)` negates a selector list in the current scope, returning every
-- descendant that matches none of the inner selectors.
query.check(root, ":not(MeshPart)", { "ModelA", "RedTree", "FolderB", "ModelC", "PartC", "PartD" })
query.check(root, ":not(Par... | 275 |
revvy02/rodeo | revvy02-rodeo-1c8b6e8/tests-new/adapters/lune/roblox/instance/query/SelectorLists.luau | luau | .luau | local query = require("./tree")
local root = query.build()
-- A selector list (the `,` operator) is a union of independent selectors. The
-- matches of each selector are appended in order, and results are NOT
-- de-duplicated across the list.
query.check(root, ".Fruit, .SwordPart", { "RedTree", "MeshA" })
-- The sam... | 172 |
revvy02/rodeo | revvy02-rodeo-1c8b6e8/tests-new/adapters/lune/roblox/instance/query/TagsAndNames.luau | luau | .luau | local query = require("./tree")
local root = query.build()
-- Tag selectors (`.Tag`) match CollectionService tags
query.check(root, ".Fruit", { "RedTree" })
query.check(root, ".SwordPart", { "MeshA" })
-- Name selectors (`#Name`) match the exact Instance.Name
query.check(root, "#RedTree", { "RedTree" })
query.check(r... | 104 |
revvy02/rodeo | revvy02-rodeo-1c8b6e8/tests-new/adapters/lune/roblox/instance/query/tree.luau | luau | .luau | --[[
Shared fixtures for the Instance:QueryDescendants tests.
The tree and the expected results below are taken directly from probes run
against the live Roblox engine, so these tests assert real engine behavior:
QDRoot (Folder)
|- ModelA (Model) [tag Apple, attr Variety=Fuji, Flavor=4]
| |- RedTree ... | 771 |
revvy02/rodeo | revvy02-rodeo-1c8b6e8/tests-new/adapters/lune/roblox/instance/tags.luau | luau | .luau | local roblox = require("@lune/roblox")
local Instance = roblox.Instance
local model = Instance.new("Model")
local part = Instance.new("Part")
part.Parent = model
local TAG_NAME = "InstanceTagName"
assert(model:HasTag(TAG_NAME) == false)
assert(part:HasTag(TAG_NAME) == false)
part:AddTag(TAG_NAME)
assert(model:HasT... | 201 |
revvy02/rodeo | revvy02-rodeo-1c8b6e8/tests-new/adapters/lune/roblox/misc/typeof.luau | luau | .luau | local roblox = require("@lune/roblox") :: any
local TYPES_AND_VALUES = {
Axes = roblox.Axes.new(),
BrickColor = roblox.BrickColor.new("Really red"),
CFrame = roblox.CFrame.new(),
Color3 = roblox.Color3.new(0, 0, 0),
ColorSequence = roblox.ColorSequence.new(roblox.Color3.new(0, 0, 0)),
ColorSequenceKeypoint = rob... | 531 |
revvy02/rodeo | revvy02-rodeo-1c8b6e8/tests-new/adapters/lune/roblox/reflection/class.luau | luau | .luau | local roblox = require("@lune/roblox")
local db = roblox.getReflectionDatabase()
-- Make sure database classes exist + fields / properties are correct types
for _, className in db:GetClassNames() do
local class = db:GetClass(className)
assert(class ~= nil, "Missing " .. className .. " class in database")
assert(t... | 331 |
revvy02/rodeo | revvy02-rodeo-1c8b6e8/tests-new/adapters/lune/roblox/reflection/database.luau | luau | .luau | local roblox = require("@lune/roblox")
local db = roblox.getReflectionDatabase()
local db2 = roblox.getReflectionDatabase()
-- Subsequent calls to getReflectionDatabase should return the same database
assert(db == db2, "Database should always compare as equal to other database")
-- Database should not be empty
asser... | 582 |
revvy02/rodeo | revvy02-rodeo-1c8b6e8/tests-new/adapters/lune/roblox/reflection/enums.luau | luau | .luau | local roblox = require("@lune/roblox")
local db = roblox.getReflectionDatabase()
-- Certain enums are legitimately empty in the database,
-- and must not make this test fail.
local IGNORED_EMPTY_ENUMS: { string } = {
"AudioCaptureMode",
"TagReplicability",
}
-- Make sure database enums exist + fields / properties... | 335 |
revvy02/rodeo | revvy02-rodeo-1c8b6e8/tests-new/adapters/lune/roblox/reflection/property.luau | luau | .luau | local roblox = require("@lune/roblox")
local db = roblox.getReflectionDatabase()
-- Make sure database class properties exist + their fields / properties are correct types
for _, className in db:GetClassNames() do
local class = db:GetClass(className)
assert(class ~= nil)
for name, prop in class.Properties do
a... | 150 |
revvy02/rodeo | revvy02-rodeo-1c8b6e8/tests-new/adapters/lune/serde/compression/files.luau | luau | .luau | --[[
The "compress" tests are currently disabled, and may not ever be enabled again.
Unit testing that our compression implementation produces the exact result saved
in test files is very fragile and prone to breakage whenever one of the crates
we depend on for compression algorithms updates, be it to improve comp... | 930 |
revvy02/rodeo | revvy02-rodeo-1c8b6e8/tests-new/adapters/lune/serde/compression/roundtrip.luau | luau | .luau | local fs = require("@lune/fs")
local process = require("@lune/process")
local serde = require("@lune/serde")
local stdio = require("@lune/stdio")
local FORMATS: { serde.CompressDecompressFormat } = { "brotli", "gzip", "lz4", "zlib", "zstd" }
local FILES: { string } = {
"tests/serde/test-files/loremipsum.txt",
"tests... | 583 |
revvy02/rodeo | revvy02-rodeo-1c8b6e8/tests-new/adapters/lune/serde/hashing/hash.luau | luau | .luau | local serde = require("@lune/serde")
local TEST_INPUT =
"Luau is a fast, small, safe, gradually typed embeddable scripting language derived from Lua."
local function test_case_hash(algorithm: serde.HashAlgorithm, expected: string)
assert(
serde.hash(algorithm, TEST_INPUT) == expected,
`hashing algorithm '{algor... | 831 |
revvy02/rodeo | revvy02-rodeo-1c8b6e8/tests-new/adapters/lune/serde/hashing/hmac.luau | luau | .luau | local serde = require("@lune/serde")
local INPUT_STRING = "important data to verify the integrity of"
-- if you read this string, you're obligated to keep it a secret! :-)
local SECRET_STRING = "don't read this we operate on the honor system"
local function test_case_hmac(algorithm: serde.HashAlgorithm, expected: st... | 998 |
revvy02/rodeo | revvy02-rodeo-1c8b6e8/tests-new/adapters/lune/serde/json/decode.luau | luau | .luau | local serde = require("@lune/serde")
local source = require("./source")
local decoded = serde.decode("json", source.pretty)
assert(type(decoded) == "table", "Decoded payload was not a table")
assert(decoded.Hello == "World", "Decoded payload Hello was not World")
assert(type(decoded.Inner) == "table", "Decoded payloa... | 197 |
revvy02/rodeo | revvy02-rodeo-1c8b6e8/tests-new/adapters/lune/serde/json/encode.luau | luau | .luau | local serde = require("@lune/serde")
local source = require("./source")
local decoded = serde.decode("json", source.pretty)
local encoded = serde.encode("json", decoded, false)
assert(encoded == source.encoded, "JSON round-trip did not produce the same result")
local encodedPretty = serde.encode("json", decoded, true... | 93 |
revvy02/rodeo | revvy02-rodeo-1c8b6e8/tests-new/adapters/lune/serde/json/source.luau | luau | .luau | local JSON_STRING = [[{"Foo":"Bar","Hello":"World","Inner":{"Array":[1,3,2]}}]]
local JSON_STRING_PRETTY = [[{
"Foo": "Bar",
"Hello": "World",
"Inner": {
"Array": [
1,
3,
2
]
}
}]]
return {
encoded = JSON_STRING,
pretty = JSON_STRING_PRETTY,
}
| 93 |
revvy02/rodeo | revvy02-rodeo-1c8b6e8/tests-new/adapters/lune/serde/jsonc/decode.luau | luau | .luau | local serde = require("@lune/serde")
local source = require("./source")
local decoded = serde.decode("jsonc", source.encoded)
assert(type(decoded) == "table", "Decoded payload was not a table")
assert(decoded.Hello == "World", "Decoded payload Hello was not World")
assert(type(decoded.Inner) == "table", "Decoded payl... | 199 |
revvy02/rodeo | revvy02-rodeo-1c8b6e8/tests-new/adapters/lune/serde/jsonc/encode.luau | luau | .luau | local serde = require("@lune/serde")
local source = require("./source")
-- NOTE: Our json format (intentionally) does not round-trip or keep
-- comments, so we will strip those for the purposes of this test
local original = string.gsub(source.encoded, "%s*//[^\n]+", "")
local decoded = serde.decode("jsonc", original)... | 111 |
revvy02/rodeo | revvy02-rodeo-1c8b6e8/tests-new/adapters/lune/serde/jsonc/source.luau | luau | .luau | local JSON_STRING = [[{
"Foo": "Bar", // Baz ?!?
"Hello": "World",
"Inner": {
"Array": [
1,
3,
2
]
}
}]]
return {
encoded = JSON_STRING,
}
| 62 |
revvy02/rodeo | revvy02-rodeo-1c8b6e8/tests-new/adapters/lune/serde/toml/decode.luau | luau | .luau | local serde = require("@lune/serde")
local source = require("./source")
local toml = serde.decode("toml", source.encoded)
assert(toml.package.name == "my-cool-toml-package")
assert(toml.package.version == "0.1.0")
assert(toml.values.epic == true)
| 71 |
revvy02/rodeo | revvy02-rodeo-1c8b6e8/tests-new/adapters/lune/serde/toml/encode.luau | luau | .luau | local serde = require("@lune/serde")
local source = require("./source")
local str = serde.encode("toml", source.decoded)
assert(str == source.encoded)
| 37 |
revvy02/rodeo | revvy02-rodeo-1c8b6e8/tests-new/adapters/lune/serde/toml/source.luau | luau | .luau | local TOML_LINES = {
"[package]",
'name = "my-cool-toml-package"',
'version = "0.1.0"',
"",
"[values]",
"epic = true",
"",
}
local TOML_STRING = table.concat(TOML_LINES, "\n")
local TOML_TABLE = {
package = {
name = "my-cool-toml-package",
version = "0.1.0",
},
values = {
epic = true,
},
}
return {
... | 128 |
revvy02/rodeo | revvy02-rodeo-1c8b6e8/tests-new/adapters/lune/stdio/color.luau | luau | .luau | local stdio = require("@lune/stdio")
local COLORS_VALID =
{ "reset", "black", "red", "green", "yellow", "blue", "purple", "cyan", "white" }
local COLORS_INVALID = { "", "gray", "grass", "red?", "super red", " ", "none" }
for _, color in COLORS_VALID do
stdio.color(color :: any)
stdio.color("reset")
end
for _, col... | 145 |
revvy02/rodeo | revvy02-rodeo-1c8b6e8/tests-new/adapters/lune/stdio/ewrite.luau | luau | .luau | local process = require("@lune/process")
local stdio = require("@lune/stdio")
stdio.ewrite("Hello, stderr!")
process.exit(0)
| 34 |
revvy02/rodeo | revvy02-rodeo-1c8b6e8/tests-new/adapters/lune/stdio/format.luau | luau | .luau | local process = require("@lune/process")
local regex = require("@lune/regex")
local roblox = require("@lune/roblox")
local stdio = require("@lune/stdio")
local function assertFormatting(errorMessage: string, formatted: string, expected: string)
if formatted ~= expected then
stdio.ewrite(string.format("%s\nExpected:... | 974 |
revvy02/rodeo | revvy02-rodeo-1c8b6e8/tests-new/adapters/lune/stdio/prompt.luau | luau | .luau | local process = require("@lune/process")
local stdio = require("@lune/stdio")
local task = require("@lune/task")
-- NOTE: This test is intentionally not included in the
-- automated tests suite since it requires user input
local passed = false
task.delay(0.2, function()
if passed then
task.spawn(error, "Prompt mus... | 371 |
revvy02/rodeo | revvy02-rodeo-1c8b6e8/tests-new/adapters/lune/stdio/style.luau | luau | .luau | local stdio = require("@lune/stdio")
local STYLES_VALID = { "reset", "bold", "dim" }
local STYLES_INVALID = { "", "*bold*", "dimm", "megabright", "cheerful", "sad", " " }
for _, style in STYLES_VALID do
stdio.style(style :: any)
stdio.style("reset")
end
for _, style in STYLES_INVALID do
if pcall(stdio.style, styl... | 134 |
revvy02/rodeo | revvy02-rodeo-1c8b6e8/tests-new/adapters/lune/task/cancel.luau | luau | .luau | local task = require("@lune/task")
-- Cancel should cancel any deferred or delayed threads
local flag: boolean = false
local thread = task.defer(function()
flag = true
end)
task.cancel(thread)
task.wait(0.1)
assert(not flag, "Cancel should handle deferred threads")
local flag2: boolean = false
local thread2 = task.... | 208 |
revvy02/rodeo | revvy02-rodeo-1c8b6e8/tests-new/adapters/lune/task/defer.luau | luau | .luau | local task = require("@lune/task")
-- Deferring a task should return the thread that can then be cancelled
local thread = task.defer(function() end)
assert(type(thread) == "thread", "Defer should return the thread spawned")
-- Deferred functions should run after other threads
local flag: boolean = false
task.defer(... | 479 |
revvy02/rodeo | revvy02-rodeo-1c8b6e8/tests-new/adapters/lune/task/delay.luau | luau | .luau | local task = require("@lune/task")
-- Delaying a task should return the thread that can then be cancelled
local thread = task.delay(0, function() end)
assert(type(thread) == "thread", "Delay should return the thread spawned")
-- Delayed functions should never run right away
local flag: boolean = false
task.delay(0,... | 453 |
revvy02/rodeo | revvy02-rodeo-1c8b6e8/tests-new/adapters/lune/task/fcheck.luau | luau | .luau | local stdio = require("@lune/stdio")
return function(index: number, type: string, value: any)
if typeof(value) ~= type then
error(
string.format(
"Expected argument #%d to be of type %s, got %s",
index,
type,
stdio.format(value)
)
)
end
end
| 80 |
revvy02/rodeo | revvy02-rodeo-1c8b6e8/tests-new/adapters/lune/task/spawn.luau | luau | .luau | local task = require("@lune/task")
-- Spawning a task should return the thread that can then be cancelled
local thread = task.spawn(function() end)
assert(type(thread) == "thread", "Spawn should return the thread spawned")
-- Spawned functions should run right away
local flag: boolean = false
task.spawn(function()
... | 454 |
revvy02/rodeo | revvy02-rodeo-1c8b6e8/tests-new/adapters/lune/task/wait.luau | luau | .luau | local process = require("@lune/process")
local stdio = require("@lune/stdio")
local task = require("@lune/task")
-- NOTE: For now we don't test accuracy of waiting, the only thing
-- we guarantee is that task.wait waits for _at least_ the amount
-- of time given. Windows sleep is extremely inaccurate.
local TEST_ACCUR... | 679 |
revvy02/rodeo | revvy02-rodeo-1c8b6e8/tests-new/adapters/lute/fs.luau | luau | .luau | -- @lute/fs conformance, per submodules/lute/definitions/fs.luau.
local fs = require("@lute/fs")
local function check(cond: boolean, msg: string)
if not cond then
error(msg, 2)
end
end
-- write/read round-trip through handles
local h = fs.open("lute-fs-test.txt", "w")
fs.write(h, "hello lute")
fs.close(h)
local h... | 896 |
revvy02/rodeo | revvy02-rodeo-1c8b6e8/tests-new/adapters/lute/process.luau | luau | .luau | -- @lute/process conformance, per submodules/lute/definitions/process.luau.
local process = require("@lute/process")
local function check(cond: boolean, msg: string)
if not cond then
error(msg, 2)
end
end
check(type(process.args) == "table", "args should be a table")
check(type(process.env) == "table", "env shoul... | 455 |
revvy02/rodeo | revvy02-rodeo-1c8b6e8/tests-new/adapters/lute/task.luau | luau | .luau | -- @lute/task conformance, per submodules/lute/definitions/task.luau.
local task = require("@lute/task")
local time = require("@lute/time")
local function check(cond: boolean, msg: string)
if not cond then
error(msg, 2)
end
end
-- wait returns elapsed and accepts Durations
local waited = task.wait(0.05)
check(typ... | 400 |
revvy02/rodeo | revvy02-rodeo-1c8b6e8/tests-new/adapters/lute/time.luau | luau | .luau | -- @lute/time conformance, per submodules/lute/definitions/time.luau.
local task = require("@lute/task")
local time = require("@lute/time")
local function check(cond: boolean, msg: string)
if not cond then
error(msg, 2)
end
end
-- Instants: now/since/elapsed, ordering, subtraction to Duration
local a = time.now()... | 570 |
revvy02/rodeo | revvy02-rodeo-1c8b6e8/tests-new/fixtures/context-project/src/ReplicatedStorage/globalState.luau | luau | .luau | return { value = "original" }
| 8 |
revvy02/rodeo | revvy02-rodeo-1c8b6e8/tests-new/fixtures/context-project/src/ServerScriptService/globalStateMutater.server.luau | luau | .luau | local globalState = require(game.ReplicatedStorage.globalState)
globalState.value = "mutated"
| 21 |
revvy02/rodeo | revvy02-rodeo-1c8b6e8/tests-new/fixtures/resolve/cross-dir.luau | luau | .luau | local greeting = require("../shared/greeting")
return greeting.message
| 13 |
revvy02/rodeo | revvy02-rodeo-1c8b6e8/tests-new/fixtures/resolve/directive-bundle.luau | luau | .luau | -- @rodeo run
local io = require("@rodeo/io")
local stream = require("@rodeo/stream")
stream.write(io.stdout, "directive_ok\n")
return "directive_ok"
| 39 |
revvy02/rodeo | revvy02-rodeo-1c8b6e8/tests-new/fixtures/resolve/ext-main.luau | luau | .luau | local helper = require("./helper")
return helper.value
| 11 |
revvy02/rodeo | revvy02-rodeo-1c8b6e8/tests-new/fixtures/resolve/helper.luau | luau | .luau | return { value = "from_helper" }
| 9 |
revvy02/rodeo | revvy02-rodeo-1c8b6e8/tests-new/fixtures/resolve/lib/init.luau | luau | .luau | local utils = require("@self/utils")
return utils
| 11 |
revvy02/rodeo | revvy02-rodeo-1c8b6e8/tests-new/fixtures/resolve/lib/utils.luau | luau | .luau | return { value = "nested_ok" }
| 9 |
revvy02/rodeo | revvy02-rodeo-1c8b6e8/tests-new/fixtures/resolve/mixed-requires.luau | luau | .luau | local io = require("@rodeo/io")
local stream = require("@rodeo/stream")
local helper = require("./helper")
local process = require("@lune/process")
stream.write(io.stdout, "mixed:" .. helper.value .. ":" .. process.cwd .. "\n")
return "mixed_ok"
| 59 |
revvy02/rodeo | revvy02-rodeo-1c8b6e8/tests-new/fixtures/resolve/nested-main.luau | luau | .luau | local lib = require("./lib")
return lib.value
| 11 |
revvy02/rodeo | revvy02-rodeo-1c8b6e8/tests-new/fixtures/resolve/no-deps.luau | luau | .luau | return "no_deps_ok"
| 6 |
revvy02/rodeo | revvy02-rodeo-1c8b6e8/tests-new/fixtures/resolve/packages/chain/deep.luau | luau | .luau | return { value = "ok" }
| 8 |
revvy02/rodeo | revvy02-rodeo-1c8b6e8/tests-new/fixtures/resolve/packages/chain/init.luau | luau | .luau | local deep = require("@self/deep")
return { value = "transitive_" .. deep.value }
| 21 |
revvy02/rodeo | revvy02-rodeo-1c8b6e8/tests-new/fixtures/resolve/packages/mathlib/add.luau | luau | .luau | return function(a: number, b: number): number
return a + b
end
| 19 |
revvy02/rodeo | revvy02-rodeo-1c8b6e8/tests-new/fixtures/resolve/packages/mathlib/init.luau | luau | .luau | local add = require("@self/add")
local multiply = require("@self/multiply")
return { add = add, multiply = multiply }
| 27 |
revvy02/rodeo | revvy02-rodeo-1c8b6e8/tests-new/fixtures/resolve/packages/mathlib/multiply.luau | luau | .luau | return function(a: number, b: number): number
return a * b
end
| 19 |
revvy02/rodeo | revvy02-rodeo-1c8b6e8/tests-new/fixtures/resolve/pkg-internal.luau | luau | .luau | local mathlib = require("./packages/mathlib")
return tostring(mathlib.add(2, 3))
| 21 |
revvy02/rodeo | revvy02-rodeo-1c8b6e8/tests-new/fixtures/resolve/rodeo-alias.luau | luau | .luau | local fs = require("@rodeo/fs")
local io = require("@rodeo/io")
local stream = require("@rodeo/stream")
stream.write(io.stdout, "resolved\n")
return "alias_ok"
| 41 |
revvy02/rodeo | revvy02-rodeo-1c8b6e8/tests-new/fixtures/resolve/sourcemap-test/main.luau | luau | .luau | local helper = require("./helper")
local ok, mylib = pcall(require, "./packages/mylib")
local tag = if ok then mylib.tag else "skipped"
return "sm:" .. tag .. ":" .. helper.value
| 48 |
revvy02/rodeo | revvy02-rodeo-1c8b6e8/tests-new/fixtures/resolve/sourcemap-test/packages/mylib/init.luau | luau | .luau | return { tag = "from_mylib" }
| 10 |
revvy02/rodeo | revvy02-rodeo-1c8b6e8/tests-new/fixtures/resolve/transitive.luau | luau | .luau | local chain = require("./packages/chain")
return chain.value
| 13 |
revvy02/rodeo | revvy02-rodeo-1c8b6e8/tests-new/fixtures/shared/greeting.luau | luau | .luau | return { message = "cross_dir_ok" }
| 10 |
revvy02/rodeo | revvy02-rodeo-1c8b6e8/tests-new/fixtures/traversal-project/src/ReplicatedStorage/deep/child.luau | luau | .luau | local leaf = require("../leaf")
return { value = "original", leaf = leaf }
| 18 |
revvy02/rodeo | revvy02-rodeo-1c8b6e8/tests-new/fixtures/traversal-project/src/ReplicatedStorage/deep/init.luau | luau | .luau | local child = require("@self/child")
return { value = "original", child = child }
| 20 |
revvy02/rodeo | revvy02-rodeo-1c8b6e8/tests-new/fixtures/traversal-project/src/ReplicatedStorage/mid.luau | luau | .luau | local leaf = require("./leaf")
return { value = "original", leaf = leaf }
| 18 |
revvy02/rodeo | revvy02-rodeo-1c8b6e8/tests-new/fixtures/traversal-project/src/ServerScriptService/mutator.server.luau | luau | .luau | local leaf = require(game.ReplicatedStorage.leaf)
local mid = require(game.ReplicatedStorage.mid)
local deep = require(game.ReplicatedStorage.deep)
leaf.value = "mutated"
mid.value = "mutated"
deep.value = "mutated"
deep.child.value = "mutated"
| 63 |
revvy02/rodeo | revvy02-rodeo-1c8b6e8/tests-new/utils/executionTests.ts | roblox-ts | .ts | // Shared execution test cases — port of tests/utils/executionTests.luau.
// Each module is a function taking a `run(opts)` closure that executes against
// some DOM (caller chooses: edit:plugin, test:server, run:server, etc). Mode
// transitions are driven by opts.target on every runCode dispatch, so factories
// neve... | 8,700 |
revvy02/rodeo | revvy02-rodeo-1c8b6e8/tests-new/utils/pkgTests.ts | roblox-ts | .ts | // Shared @rodeo/* API test cases — port of tests/utils/pkgTests.luau.
// Each module is a function taking a `run(opts)` closure that executes against
// some DOM. No case names or script sources are modified from the lute version.
import { it, expect } from "bun:test";
import { readFileSync, rmSync } from "node:fs";
... | 6,859 |
revvy02/rodeo | revvy02-rodeo-1c8b6e8/tests-new/utils/profiling.ts | roblox-ts | .ts | import { existsSync, readdirSync, readFileSync } from "node:fs";
import { join } from "node:path";
import { expect } from "bun:test";
export { extractMarker } from "./markers.js";
/**
* Heartbeat-loop script that emits a per-frame `debug.profilebegin(marker)` /
* `profileend()` for ~5s. The marker is a fresh GUID m... | 949 |
ActualMasterOogway/Iridium | ActualMasterOogway-Iridium-2a834af/.lune/regex.luau | luau | .luau | --[=[
@class RegexMatch
A match from a regular expression.
Contains the following values:
- `start` -- The start index of the match in the original string.
- `finish` -- The end index of the match in the original string.
- `text` -- The text that was matched.
- `len` -- The length of the text that was matched... | 1,219 |
ActualMasterOogway/Iridium | ActualMasterOogway-Iridium-2a834af/Build/Lib/BundleModel.luau | luau | .luau | -- MIT License | Copyright (c) 2023-2024 Latte Softworks <https://latte.to>
local luau = require("@lune/luau")
local roblox = require("@lune/roblox")
local LuneUtils = require("./Libraries/LuneUtils")
local Log = LuneUtils.Log
local StringUtils = LuneUtils.StringUtils
local LuaEncode = require("./Libraries/LuaEncod... | 2,140 |
ActualMasterOogway/Iridium | ActualMasterOogway-Iridium-2a834af/Build/Lib/Data/Template.luau | luau | .luau | -- This codegen template *must* be 100% compatible with Lua 5.1x+, NOT just Luau
-- With that being said, this explains the weird cflow in some parts
return [[
-- ++++++++ WAX BUNDLED DATA BELOW ++++++++ --
-- Will be used later for getting flattened globals
local ImportGlobals
-- Holds direct closure data (defining... | 4,128 |
ActualMasterOogway/Iridium | ActualMasterOogway-Iridium-2a834af/Build/Lib/Libraries/LuneUtils/CommandUtils.luau | luau | .luau | -- MIT License | Copyright (c) 2023-2024 Latte Softworks <https://latte.to>
local process = require("@lune/process")
local CommandUtils = {}
function CommandUtils.CommandExists(binary: string): boolean
if process.os ~= "windows" then
-- Unix-compliance is simple!
return process.exec("type", {bina... | 173 |
ActualMasterOogway/Iridium | ActualMasterOogway-Iridium-2a834af/Build/Lib/Libraries/LuneUtils/EnsureFileTree.luau | luau | .luau | -- MIT License | Copyright (c) 2023-2024 Latte Softworks <https://latte.to>
local fs = require("@lune/fs")
--[[
This kinda looks like a strange function, because of the format a "FileTree" accepts:
```lua
EnsureFileTree({
["test"] = {
["test.txt"] = "hi",
["test.json"] = "... | 302 |
ActualMasterOogway/Iridium | ActualMasterOogway-Iridium-2a834af/Build/Lib/Libraries/LuneUtils/ParseArgs.luau | luau | .luau | -- MIT License | Copyright (c) 2023-2024 Latte Softworks <https://latte.to>
type OptionsInput = {[string]: {string | number | boolean | nil}}
type OptionsOutput = {[string]: string | number | boolean | nil}
local process = require("@lune/process")
local Log = require("./Log")
local function ParseArgs(args: {string}... | 488 |
ActualMasterOogway/Iridium | ActualMasterOogway-Iridium-2a834af/Build/Lib/Libraries/LuneUtils/RecursiveReadDir.luau | luau | .luau | -- MIT License | Copyright (c) 2023-2024 Latte Softworks <https://latte.to>
local fs = require("@lune/fs")
local function RecursiveReadDir(directory: string, _existingFileList: {string}?): {string}
if not string.match(directory, "[/\\]$") then
directory ..= "/"
end
local FileList = _existingFileL... | 159 |
ActualMasterOogway/Iridium | ActualMasterOogway-Iridium-2a834af/Build/Lib/Libraries/LuneUtils/Run.luau | luau | .luau | -- MIT License | Copyright (c) 2023-2024 Latte Softworks <https://latte.to>
local process = require("@lune/process")
local Log = require("./Log")
local function Run(command: string, args: {string}?, directRun: boolean?, errorHandler: (string?) -> ()?): process.ExecResult
local Args = args or {}
local DirectR... | 221 |
ActualMasterOogway/Iridium | ActualMasterOogway-Iridium-2a834af/Build/Lib/Libraries/LuneUtils/init.luau | luau | .luau | -- MIT License | Copyright (c) 2023-2024 Latte Softworks <https://latte.to>
return {
Log = require("@self/Log"),
StringUtils = require("@self/StringUtils"),
CommandUtils = require("@self/CommandUtils"),
WebhookQueue = require("@self/WebhookQueue"),
Run = require("@self/Run"),
ParseArgs = requi... | 115 |
ActualMasterOogway/Iridium | ActualMasterOogway-Iridium-2a834af/Src/Classes/Constants/Boolean.luau | luau | .luau | local LuauSpec = require("@root/Luau/Spec")
--[=[
@class Boolean
The Boolean class is used to lift a constant type with the LBC_CONSTANT_BOOLEAN id (1)
]=]
local Boolean = {}
Boolean.__type = "Boolean"
Boolean.__constant_type = LuauSpec.LuauBytecodeConstants.LBC_CONSTANT_BOOLEAN
Boolean.__index = Boolean
local Tru... | 205 |
ActualMasterOogway/Iridium | ActualMasterOogway-Iridium-2a834af/Src/Classes/Constants/ClassShape.luau | luau | .luau | local LuauSpec = require("@root/Luau/Spec")
--[=[
@class ClassShape
The ClassShape class is used to lift a constant type with the
LBC_CONSTANT_CLASS_SHAPE id (10), added in bytecode version 10.
It describes a user-defined `class` declaration: the class name plus the
names of its properties and methods. ClassNam... | 340 |
ActualMasterOogway/Iridium | ActualMasterOogway-Iridium-2a834af/Src/Classes/Constants/Closure.luau | luau | .luau | local LuauSpec = require("@root/Luau/Spec")
--[=[
@class Closure
The Closure class is used to lift a constant type with the LBC_CONSTANT_CLOSURE id (6)
]=]
local Closure = {}
Closure.__type = "Closure"
Closure.__constant_type = LuauSpec.LuauBytecodeConstants.LBC_CONSTANT_CLOSURE
Closure.__index = Closure
--[=[
@w... | 206 |
ActualMasterOogway/Iridium | ActualMasterOogway-Iridium-2a834af/Src/Classes/Constants/Import.luau | luau | .luau | local LuauSpec = require("@root/Luau/Spec")
local String = require("@root/Classes/Constants/String")
--[=[
@class Import
The Import class is used to lift a constant type with the LBC_CONSTANT_IMPORT id (4)
]=]
local Import = {}
Import.__type = "Import"
Import.__constant_type = LuauSpec.LuauBytecodeConstants.LBC_CON... | 341 |
ActualMasterOogway/Iridium | ActualMasterOogway-Iridium-2a834af/Src/Classes/Constants/Integer.luau | luau | .luau | local LuauSpec = require("@root/Luau/Spec")
--[=[
@class Integer
The Integer class is used to lift a constant type with the LBC_CONSTANT_INTEGER id (9)
]=]
local Integer = {}
Integer.__type = "Integer"
Integer.__constant_type = LuauSpec.LuauBytecodeConstants.LBC_CONSTANT_INTEGER
Integer.__index = Integer
--[=[
@w... | 235 |
ActualMasterOogway/Iridium | ActualMasterOogway-Iridium-2a834af/Src/Classes/Constants/Nil.luau | luau | .luau | local LuauSpec = require("@root/Luau/Spec")
--[=[
@class Nil
The Nil class is used to lift a constant type with the LBC_CONSTANT_NIL id (0)
]=]
local Nil = {}
Nil.__type = "Nil"
Nil.__constant_type = LuauSpec.LuauBytecodeConstants.LBC_CONSTANT_NIL
Nil.__index = Nil
local Singleton = setmetatable({}, Nil)
table.fre... | 170 |
ActualMasterOogway/Iridium | ActualMasterOogway-Iridium-2a834af/Src/Classes/Constants/Number.luau | luau | .luau | local LuauSpec = require("@root/Luau/Spec")
--[=[
@class Number
The Number class is used to lift a constant type with the LBC_CONSTANT_NUMBER id (2)
]=]
local Number = {}
Number.__type = "Number"
Number.__constant_type = LuauSpec.LuauBytecodeConstants.LBC_CONSTANT_NUMBER
Number.__index = Number
--[=[
@within Numb... | 201 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.