1
0
mirror of https://github.com/SquidDev-CC/CC-Tweaked synced 2024-06-25 22:53:22 +00:00
CC-Tweaked/src/test/resources/test-rom/spec/programs/peripherals_spec.lua
SquidDev cb8135a0d1 Bump Cobalt version
- Remove stub for table.pack/table.unpack.
 - Remove Lua 5.3 bitlib stub. We're not on 5.3, there's no
   point emulating it.
 - Change peripheral.call to correctly adjust the error level. This is a
   terrible hack, but I believe the only good option.

It'd be good to remove load as well, but it's a little more complex due
to our injecting of _ENV.

Closes #363
2020-04-16 10:48:26 +01:00

10 lines
370 B
Lua

local capture = require "test_helpers".capture_program
describe("The peripherals program", function()
it("says when there are no peripherals", function()
stub(peripheral, 'getNames', function() return {} end)
expect(capture(stub, "peripherals"))
:matches { ok = true, output = "Attached Peripherals:\nNone\n", error = "" }
end)
end)