mirror of
https://github.com/SquidDev-CC/CC-Tweaked
synced 2025-10-28 04:17:38 +00:00
License CC:T according to the REUSE specification (#1351)
This adds SPDX license headers to all source code files, following the REUSE[1] specification. This does not include any asset files (such as generated JSON files, or textures). While REUSE does support doing so with ".license" files, for now we define these licences using the .reuse/dep5 file. [1]: https://reuse.software/
This commit is contained in:
@@ -1,8 +1,7 @@
|
||||
/*
|
||||
* This file is part of ComputerCraft - http://www.computercraft.info
|
||||
* Copyright Daniel Ratcliffe, 2011-2022. Do not distribute without permission.
|
||||
* Send enquiries to dratcliffe@gmail.com
|
||||
*/
|
||||
// SPDX-FileCopyrightText: 2019 The CC: Tweaked Developers
|
||||
//
|
||||
// SPDX-License-Identifier: MPL-2.0
|
||||
|
||||
package dan200.computercraft.core;
|
||||
|
||||
import dan200.computercraft.api.filesystem.WritableMount;
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
/*
|
||||
* This file is part of ComputerCraft - http://www.computercraft.info
|
||||
* Copyright Daniel Ratcliffe, 2011-2022. Do not distribute without permission.
|
||||
* Send enquiries to dratcliffe@gmail.com
|
||||
*/
|
||||
// SPDX-FileCopyrightText: 2020 The CC: Tweaked Developers
|
||||
//
|
||||
// SPDX-License-Identifier: MPL-2.0
|
||||
|
||||
package dan200.computercraft.core;
|
||||
|
||||
import it.unimi.dsi.fastutil.ints.Int2IntMap;
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
/*
|
||||
* This file is part of ComputerCraft - http://www.computercraft.info
|
||||
* Copyright Daniel Ratcliffe, 2011-2022. Do not distribute without permission.
|
||||
* Send enquiries to dratcliffe@gmail.com
|
||||
*/
|
||||
// SPDX-FileCopyrightText: 2022 The CC: Tweaked Developers
|
||||
//
|
||||
// SPDX-License-Identifier: MPL-2.0
|
||||
|
||||
package dan200.computercraft.core;
|
||||
|
||||
import java.nio.file.Path;
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
/*
|
||||
* This file is part of ComputerCraft - http://www.computercraft.info
|
||||
* Copyright Daniel Ratcliffe, 2011-2022. Do not distribute without permission.
|
||||
* Send enquiries to dratcliffe@gmail.com
|
||||
*/
|
||||
// SPDX-FileCopyrightText: 2018 The CC: Tweaked Developers
|
||||
//
|
||||
// SPDX-License-Identifier: MPL-2.0
|
||||
|
||||
package dan200.computercraft.core.apis;
|
||||
|
||||
import dan200.computercraft.api.lua.*;
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
/*
|
||||
* This file is part of ComputerCraft - http://www.computercraft.info
|
||||
* Copyright Daniel Ratcliffe, 2011-2022. Do not distribute without permission.
|
||||
* Send enquiries to dratcliffe@gmail.com
|
||||
*/
|
||||
// SPDX-FileCopyrightText: 2022 The CC: Tweaked Developers
|
||||
//
|
||||
// SPDX-License-Identifier: MPL-2.0
|
||||
|
||||
package dan200.computercraft.core.apis.handles;
|
||||
|
||||
import dan200.computercraft.test.core.filesystem.ReadableChannelContract;
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
/*
|
||||
* This file is part of ComputerCraft - http://www.computercraft.info
|
||||
* Copyright Daniel Ratcliffe, 2011-2022. Do not distribute without permission.
|
||||
* Send enquiries to dratcliffe@gmail.com
|
||||
*/
|
||||
// SPDX-FileCopyrightText: 2018 The CC: Tweaked Developers
|
||||
//
|
||||
// SPDX-License-Identifier: MPL-2.0
|
||||
|
||||
package dan200.computercraft.core.apis.handles;
|
||||
|
||||
import dan200.computercraft.api.lua.LuaException;
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
/*
|
||||
* This file is part of ComputerCraft - http://www.computercraft.info
|
||||
* Copyright Daniel Ratcliffe, 2011-2022. Do not distribute without permission.
|
||||
* Send enquiries to dratcliffe@gmail.com
|
||||
*/
|
||||
// SPDX-FileCopyrightText: 2022 The CC: Tweaked Developers
|
||||
//
|
||||
// SPDX-License-Identifier: MPL-2.0
|
||||
|
||||
package dan200.computercraft.core.apis.handles;
|
||||
|
||||
import dan200.computercraft.test.core.filesystem.ReadableChannelContract;
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
/*
|
||||
* This file is part of ComputerCraft - http://www.computercraft.info
|
||||
* Copyright Daniel Ratcliffe, 2011-2022. Do not distribute without permission.
|
||||
* Send enquiries to dratcliffe@gmail.com
|
||||
*/
|
||||
// SPDX-FileCopyrightText: 2018 The CC: Tweaked Developers
|
||||
//
|
||||
// SPDX-License-Identifier: MPL-2.0
|
||||
|
||||
package dan200.computercraft.core.apis.handles;
|
||||
|
||||
import dan200.computercraft.api.lua.LuaException;
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
/*
|
||||
* This file is part of ComputerCraft - http://www.computercraft.info
|
||||
* Copyright Daniel Ratcliffe, 2011-2022. Do not distribute without permission.
|
||||
* Send enquiries to dratcliffe@gmail.com
|
||||
*/
|
||||
// SPDX-FileCopyrightText: 2020 The CC: Tweaked Developers
|
||||
//
|
||||
// SPDX-License-Identifier: MPL-2.0
|
||||
|
||||
package dan200.computercraft.core.apis.http.options;
|
||||
|
||||
import dan200.computercraft.core.CoreConfig;
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
/*
|
||||
* This file is part of ComputerCraft - http://www.computercraft.info
|
||||
* Copyright Daniel Ratcliffe, 2011-2022. Do not distribute without permission.
|
||||
* Send enquiries to dratcliffe@gmail.com
|
||||
*/
|
||||
// SPDX-FileCopyrightText: 2020 The CC: Tweaked Developers
|
||||
//
|
||||
// SPDX-License-Identifier: MPL-2.0
|
||||
|
||||
package dan200.computercraft.core.asm;
|
||||
|
||||
import dan200.computercraft.api.lua.*;
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
/*
|
||||
* This file is part of ComputerCraft - http://www.computercraft.info
|
||||
* Copyright Daniel Ratcliffe, 2011-2022. Do not distribute without permission.
|
||||
* Send enquiries to dratcliffe@gmail.com
|
||||
*/
|
||||
// SPDX-FileCopyrightText: 2020 The CC: Tweaked Developers
|
||||
//
|
||||
// SPDX-License-Identifier: MPL-2.0
|
||||
|
||||
package dan200.computercraft.core.asm;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
/*
|
||||
* This file is part of ComputerCraft - http://www.computercraft.info
|
||||
* Copyright Daniel Ratcliffe, 2011-2022. Do not distribute without permission.
|
||||
* Send enquiries to dratcliffe@gmail.com
|
||||
*/
|
||||
// SPDX-FileCopyrightText: 2020 The CC: Tweaked Developers
|
||||
//
|
||||
// SPDX-License-Identifier: MPL-2.0
|
||||
|
||||
package dan200.computercraft.core.asm;
|
||||
|
||||
import dan200.computercraft.api.lua.*;
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
/*
|
||||
* This file is part of ComputerCraft - http://www.computercraft.info
|
||||
* Copyright Daniel Ratcliffe, 2011-2022. Do not distribute without permission.
|
||||
* Send enquiries to dratcliffe@gmail.com
|
||||
*/
|
||||
// SPDX-FileCopyrightText: 2019 The CC: Tweaked Developers
|
||||
//
|
||||
// SPDX-License-Identifier: MPL-2.0
|
||||
|
||||
package dan200.computercraft.core.computer;
|
||||
|
||||
import dan200.computercraft.api.filesystem.WritableMount;
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
/*
|
||||
* This file is part of ComputerCraft - http://www.computercraft.info
|
||||
* Copyright Daniel Ratcliffe, 2011-2022. Do not distribute without permission.
|
||||
* Send enquiries to dratcliffe@gmail.com
|
||||
*/
|
||||
// SPDX-FileCopyrightText: 2019 The CC: Tweaked Developers
|
||||
//
|
||||
// SPDX-License-Identifier: MPL-2.0
|
||||
|
||||
package dan200.computercraft.core.computer;
|
||||
|
||||
import com.google.common.io.CharStreams;
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
/*
|
||||
* This file is part of ComputerCraft - http://www.computercraft.info
|
||||
* Copyright Daniel Ratcliffe, 2011-2022. Do not distribute without permission.
|
||||
* Send enquiries to dratcliffe@gmail.com
|
||||
*/
|
||||
// SPDX-FileCopyrightText: 2022 The CC: Tweaked Developers
|
||||
//
|
||||
// SPDX-License-Identifier: MPL-2.0
|
||||
|
||||
package dan200.computercraft.core.computer;
|
||||
|
||||
import dan200.computercraft.core.lua.MachineResult;
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
/*
|
||||
* This file is part of ComputerCraft - http://www.computercraft.info
|
||||
* Copyright Daniel Ratcliffe, 2011-2022. Do not distribute without permission.
|
||||
* Send enquiries to dratcliffe@gmail.com
|
||||
*/
|
||||
// SPDX-FileCopyrightText: 2022 The CC: Tweaked Developers
|
||||
//
|
||||
// SPDX-License-Identifier: MPL-2.0
|
||||
|
||||
package dan200.computercraft.core.filesystem;
|
||||
|
||||
import com.google.common.io.MoreFiles;
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
/*
|
||||
* This file is part of ComputerCraft - http://www.computercraft.info
|
||||
* Copyright Daniel Ratcliffe, 2011-2022. Do not distribute without permission.
|
||||
* Send enquiries to dratcliffe@gmail.com
|
||||
*/
|
||||
// SPDX-FileCopyrightText: 2018 The CC: Tweaked Developers
|
||||
//
|
||||
// SPDX-License-Identifier: MPL-2.0
|
||||
|
||||
package dan200.computercraft.core.filesystem;
|
||||
|
||||
import com.google.common.io.Files;
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
/*
|
||||
* This file is part of ComputerCraft - http://www.computercraft.info
|
||||
* Copyright Daniel Ratcliffe, 2011-2022. Do not distribute without permission.
|
||||
* Send enquiries to dratcliffe@gmail.com
|
||||
*/
|
||||
// SPDX-FileCopyrightText: 2018 The CC: Tweaked Developers
|
||||
//
|
||||
// SPDX-License-Identifier: MPL-2.0
|
||||
|
||||
package dan200.computercraft.core.filesystem;
|
||||
|
||||
import com.google.common.io.ByteStreams;
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
/*
|
||||
* This file is part of ComputerCraft - http://www.computercraft.info
|
||||
* Copyright Daniel Ratcliffe, 2011-2022. Do not distribute without permission.
|
||||
* Send enquiries to dratcliffe@gmail.com
|
||||
*/
|
||||
// SPDX-FileCopyrightText: 2022 The CC: Tweaked Developers
|
||||
//
|
||||
// SPDX-License-Identifier: MPL-2.0
|
||||
|
||||
package dan200.computercraft.core.filesystem;
|
||||
|
||||
import com.google.common.io.MoreFiles;
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
/*
|
||||
* This file is part of ComputerCraft - http://www.computercraft.info
|
||||
* Copyright Daniel Ratcliffe, 2011-2022. Do not distribute without permission.
|
||||
* Send enquiries to dratcliffe@gmail.com
|
||||
*/
|
||||
// Copyright Daniel Ratcliffe, 2011-2022. Do not distribute without permission.
|
||||
//
|
||||
// SPDX-License-Identifier: LicenseRef-CCPL
|
||||
|
||||
package dan200.computercraft.core.terminal;
|
||||
|
||||
import dan200.computercraft.api.lua.LuaValues;
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
/*
|
||||
* This file is part of ComputerCraft - http://www.computercraft.info
|
||||
* Copyright Daniel Ratcliffe, 2011-2022. Do not distribute without permission.
|
||||
* Send enquiries to dratcliffe@gmail.com
|
||||
*/
|
||||
// Copyright Daniel Ratcliffe, 2011-2022. Do not distribute without permission.
|
||||
//
|
||||
// SPDX-License-Identifier: LicenseRef-CCPL
|
||||
|
||||
package dan200.computercraft.core.terminal;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
// SPDX-FileCopyrightText: 2022 The CC: Tweaked Developers
|
||||
//
|
||||
// SPDX-License-Identifier: MPL-2.0
|
||||
|
||||
package http
|
||||
|
||||
import dan200.computercraft.core.CoreConfig
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
-- SPDX-FileCopyrightText: 2020 The CC: Tweaked Developers
|
||||
--
|
||||
-- SPDX-License-Identifier: MPL-2.0
|
||||
|
||||
local function log(msg)
|
||||
print(msg)
|
||||
if assertion then assertion.log(msg) end
|
||||
|
||||
@@ -1 +1,4 @@
|
||||
# SPDX-FileCopyrightText: 2020 The CC: Tweaked Developers
|
||||
#
|
||||
# SPDX-License-Identifier: CC0-1.0
|
||||
junit.jupiter.execution.parallel.enabled=true
|
||||
|
||||
@@ -1 +1,5 @@
|
||||
-- SPDX-FileCopyrightText: 2020 The CC: Tweaked Developers
|
||||
--
|
||||
-- SPDX-License-Identifier: MPL-2.0
|
||||
|
||||
_G.__arg = _ENV.arg
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
-- SPDX-FileCopyrightText: 2019 The CC: Tweaked Developers
|
||||
--
|
||||
-- SPDX-License-Identifier: LicenseRef-CCPL
|
||||
|
||||
--- A very basic test framework for ComputerCraft
|
||||
--
|
||||
-- Like Busted (http://olivinelabs.com/busted/), but more memorable.
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
-- SPDX-FileCopyrightText: 2019 The CC: Tweaked Developers
|
||||
--
|
||||
-- SPDX-License-Identifier: LicenseRef-CCPL
|
||||
|
||||
describe("The colors library", function()
|
||||
describe("colors.combine", function()
|
||||
it("validates arguments", function()
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
-- SPDX-FileCopyrightText: 2019 The CC: Tweaked Developers
|
||||
--
|
||||
-- SPDX-License-Identifier: LicenseRef-CCPL
|
||||
|
||||
describe("The fs library", function()
|
||||
local test_root = "/test-files/fs"
|
||||
local function test_file(path) return fs.combine(test_root, path) end
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
-- SPDX-FileCopyrightText: 2019 The CC: Tweaked Developers
|
||||
--
|
||||
-- SPDX-License-Identifier: MPL-2.0
|
||||
|
||||
describe("The gps library", function()
|
||||
describe("gps.locate", function()
|
||||
it("validates arguments", function()
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
-- SPDX-FileCopyrightText: 2019 The CC: Tweaked Developers
|
||||
--
|
||||
-- SPDX-License-Identifier: MPL-2.0
|
||||
|
||||
describe("The help library", function()
|
||||
describe("help.setPath", function()
|
||||
it("validates arguments", function()
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
-- SPDX-FileCopyrightText: 2019 The CC: Tweaked Developers
|
||||
--
|
||||
-- SPDX-License-Identifier: MPL-2.0
|
||||
|
||||
local timeout = require "test_helpers".timeout
|
||||
|
||||
describe("The http library", function()
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
-- SPDX-FileCopyrightText: 2019 The CC: Tweaked Developers
|
||||
--
|
||||
-- SPDX-License-Identifier: MPL-2.0
|
||||
|
||||
--- Tests the io library is (mostly) consistent with PUC Lua.
|
||||
--
|
||||
-- These tests are based on the tests for Lua 5.1 and 5.3
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
-- SPDX-FileCopyrightText: 2019 The CC: Tweaked Developers
|
||||
--
|
||||
-- SPDX-License-Identifier: MPL-2.0
|
||||
|
||||
describe("The keys library", function()
|
||||
describe("keys.getName", function()
|
||||
it("validates arguments", function()
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
-- SPDX-FileCopyrightText: 2019 The CC: Tweaked Developers
|
||||
--
|
||||
-- SPDX-License-Identifier: MPL-2.0
|
||||
|
||||
describe("The os library", function()
|
||||
describe("os.date and os.time", function()
|
||||
it("round trips correctly", function()
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
-- SPDX-FileCopyrightText: 2019 The CC: Tweaked Developers
|
||||
--
|
||||
-- SPDX-License-Identifier: LicenseRef-CCPL
|
||||
|
||||
local with_window = require "test_helpers".with_window
|
||||
|
||||
describe("The paintutils library", function()
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
-- SPDX-FileCopyrightText: 2021 The CC: Tweaked Developers
|
||||
--
|
||||
-- SPDX-License-Identifier: LicenseRef-CCPL
|
||||
|
||||
describe("The parallel library", function()
|
||||
describe("parallel.waitForAny", function()
|
||||
it("validates arguments", function()
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
-- SPDX-FileCopyrightText: 2019 The CC: Tweaked Developers
|
||||
--
|
||||
-- SPDX-License-Identifier: LicenseRef-CCPL
|
||||
|
||||
describe("The peripheral library", function()
|
||||
local it_modem = peripheral.getType("top") == "modem" and it or pending
|
||||
local it_remote = peripheral.getType("bottom") == "peripheral_hub" and it or pending
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
-- SPDX-FileCopyrightText: 2019 The CC: Tweaked Developers
|
||||
--
|
||||
-- SPDX-License-Identifier: LicenseRef-CCPL
|
||||
|
||||
describe("The rednet library", function()
|
||||
describe("rednet.open", function()
|
||||
it("validates arguments", function()
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
-- SPDX-FileCopyrightText: 2020 The CC: Tweaked Developers
|
||||
--
|
||||
-- SPDX-License-Identifier: MPL-2.0
|
||||
|
||||
local function it_side(func, ...)
|
||||
local arg = table.pack(...)
|
||||
it("requires a specific side", function()
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
-- SPDX-FileCopyrightText: 2019 The CC: Tweaked Developers
|
||||
--
|
||||
-- SPDX-License-Identifier: MPL-2.0
|
||||
|
||||
describe("The settings library", function()
|
||||
describe("settings.define", function()
|
||||
it("ensures valid type names", function()
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
-- SPDX-FileCopyrightText: 2019 The CC: Tweaked Developers
|
||||
--
|
||||
-- SPDX-License-Identifier: MPL-2.0
|
||||
|
||||
describe("The term library", function()
|
||||
describe("term.redirect", function()
|
||||
it("validates arguments", function()
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
-- SPDX-FileCopyrightText: 2019 The CC: Tweaked Developers
|
||||
--
|
||||
-- SPDX-License-Identifier: LicenseRef-CCPL
|
||||
|
||||
local helpers = require "test_helpers"
|
||||
|
||||
describe("The textutils library", function()
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
-- SPDX-FileCopyrightText: 2019 The CC: Tweaked Developers
|
||||
--
|
||||
-- SPDX-License-Identifier: LicenseRef-CCPL
|
||||
|
||||
describe("The window library", function()
|
||||
local function mk()
|
||||
return window.create(term.current(), 1, 1, 5, 5, false)
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
-- SPDX-FileCopyrightText: 2019 The CC: Tweaked Developers
|
||||
--
|
||||
-- SPDX-License-Identifier: MPL-2.0
|
||||
|
||||
local with_window = require "test_helpers".with_window
|
||||
|
||||
describe("The Lua base library", function()
|
||||
|
||||
@@ -1,3 +1,9 @@
|
||||
<!--
|
||||
SPDX-FileCopyrightText: 2021 The CC: Tweaked Developers
|
||||
|
||||
SPDX-License-Identifier: MPL-2.0
|
||||
-->
|
||||
|
||||
# Lua VM tests
|
||||
|
||||
Unlike the rest of the test suites, the code in this folder doesn't test any
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
-- SPDX-FileCopyrightText: 2021 The CC: Tweaked Developers
|
||||
--
|
||||
-- SPDX-License-Identifier: MPL-2.0
|
||||
|
||||
describe("Coroutines", function()
|
||||
local function assert_resume(ok, ...)
|
||||
if ok then return table.pack(...) end
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
-- SPDX-FileCopyrightText: 2021 The CC: Tweaked Developers
|
||||
--
|
||||
-- SPDX-License-Identifier: MPL-2.0
|
||||
|
||||
describe("The VM terminates long running code :slow", function()
|
||||
it("in loops", function()
|
||||
expect.error(function() while true do end end)
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
-- SPDX-FileCopyrightText: 2021 The CC: Tweaked Developers
|
||||
--
|
||||
-- SPDX-License-Identifier: MPL-2.0
|
||||
|
||||
describe("The VM", function()
|
||||
it("allows unpacking a large number of values", function()
|
||||
-- We don't allow arbitrarily many values, half a meg is probably fine.
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
-- SPDX-FileCopyrightText: 2021 The CC: Tweaked Developers
|
||||
--
|
||||
-- SPDX-License-Identifier: MPL-2.0
|
||||
|
||||
describe("cc.audio.dfpwm", function()
|
||||
local dfpwm = require "cc.audio.dfpwm"
|
||||
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
-- SPDX-FileCopyrightText: 2019 The CC: Tweaked Developers
|
||||
--
|
||||
-- SPDX-License-Identifier: MPL-2.0
|
||||
|
||||
describe("cc.completion", function()
|
||||
local c = require("cc.completion")
|
||||
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
-- SPDX-FileCopyrightText: 2019 The CC: Tweaked Developers
|
||||
--
|
||||
-- SPDX-License-Identifier: LicenseRef-CCPL
|
||||
|
||||
describe("cc.expect", function()
|
||||
local e = require("cc.expect")
|
||||
|
||||
@@ -27,7 +31,7 @@ describe("cc.expect", function()
|
||||
worker()
|
||||
end
|
||||
|
||||
expect.error(trampoline):str_match("^[^:]*expect_spec.lua:27: bad argument #1 to 'worker' %(expected string, got nil%)$")
|
||||
expect.error(trampoline):str_match("^[^:]*expect_spec.lua:31: bad argument #1 to 'worker' %(expected string, got nil%)$")
|
||||
end)
|
||||
end)
|
||||
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
-- SPDX-FileCopyrightText: 2020 The CC: Tweaked Developers
|
||||
--
|
||||
-- SPDX-License-Identifier: LicenseRef-CCPL
|
||||
|
||||
local helpers = require "test_helpers"
|
||||
|
||||
describe("cc.image.nft", function()
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
-- SPDX-FileCopyrightText: 2023 The CC: Tweaked Developers
|
||||
--
|
||||
-- SPDX-License-Identifier: MPL-2.0
|
||||
|
||||
local helpers = require "test_helpers"
|
||||
|
||||
describe("cc.internal.syntax", function()
|
||||
|
||||
@@ -1,3 +1,9 @@
|
||||
<!--
|
||||
SPDX-FileCopyrightText: 2023 The CC: Tweaked Developers
|
||||
|
||||
SPDX-License-Identifier: MPL-2.0
|
||||
-->
|
||||
|
||||
We provide a lexer for Lua source code. Here we test that the lexer returns the
|
||||
correct tokens and positions, and that it can report sensible error messages.
|
||||
|
||||
|
||||
@@ -1,3 +1,9 @@
|
||||
<!--
|
||||
SPDX-FileCopyrightText: 2023 The CC: Tweaked Developers
|
||||
|
||||
SPDX-License-Identifier: MPL-2.0
|
||||
-->
|
||||
|
||||
An exhaustive list of all error states in the parser, and the error messages we
|
||||
generate for each one. This is _not_ a complete collection of all possible
|
||||
errors, but is a useful guide for where we might be providing terrible messages.
|
||||
|
||||
@@ -1,3 +1,9 @@
|
||||
<!--
|
||||
SPDX-FileCopyrightText: 2023 The CC: Tweaked Developers
|
||||
|
||||
SPDX-License-Identifier: MPL-2.0
|
||||
-->
|
||||
|
||||
We provide a parser for Lua source code. Here we test that the parser reports
|
||||
sensible syntax errors in specific cases.
|
||||
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
-- SPDX-FileCopyrightText: 2023 The CC: Tweaked Developers
|
||||
--
|
||||
-- SPDX-License-Identifier: MPL-2.0
|
||||
|
||||
local expect = require "cc.expect".expect
|
||||
local lex_one = require "cc.internal.syntax.lexer".lex_one
|
||||
local parser = require "cc.internal.syntax.parser"
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
-- SPDX-FileCopyrightText: 2020 The CC: Tweaked Developers
|
||||
--
|
||||
-- SPDX-License-Identifier: MPL-2.0
|
||||
|
||||
local with_window = require "test_helpers".with_window
|
||||
|
||||
describe("cc.pretty", function()
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
-- SPDX-FileCopyrightText: 2019 The CC: Tweaked Developers
|
||||
--
|
||||
-- SPDX-License-Identifier: LicenseRef-CCPL
|
||||
|
||||
describe("cc.shell.completion", function()
|
||||
local c = require "cc.shell.completion"
|
||||
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
-- SPDX-FileCopyrightText: 2020 The CC: Tweaked Developers
|
||||
--
|
||||
-- SPDX-License-Identifier: MPL-2.0
|
||||
|
||||
describe("cc.require", function()
|
||||
local r = require "cc.require"
|
||||
local function mk()
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
-- SPDX-FileCopyrightText: 2020 The CC: Tweaked Developers
|
||||
--
|
||||
-- SPDX-License-Identifier: LicenseRef-CCPL
|
||||
|
||||
describe("cc.pretty", function()
|
||||
local str = require("cc.strings")
|
||||
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
-- SPDX-FileCopyrightText: 2019 The CC: Tweaked Developers
|
||||
--
|
||||
-- SPDX-License-Identifier: LicenseRef-CCPL
|
||||
|
||||
local capture = require "test_helpers".capture_program
|
||||
|
||||
describe("The bg program", function()
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
-- SPDX-FileCopyrightText: 2019 The CC: Tweaked Developers
|
||||
--
|
||||
-- SPDX-License-Identifier: LicenseRef-CCPL
|
||||
|
||||
local capture = require "test_helpers".capture_program
|
||||
|
||||
describe("The fg program", function()
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
-- SPDX-FileCopyrightText: 2019 The CC: Tweaked Developers
|
||||
--
|
||||
-- SPDX-License-Identifier: MPL-2.0
|
||||
|
||||
describe("The multishell program", function()
|
||||
describe("multishell.setFocus", function()
|
||||
it("validates arguments", function()
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
-- SPDX-FileCopyrightText: 2019 The CC: Tweaked Developers
|
||||
--
|
||||
-- SPDX-License-Identifier: LicenseRef-CCPL
|
||||
|
||||
local capture = require "test_helpers".capture_program
|
||||
|
||||
describe("The alias program", function()
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
-- SPDX-FileCopyrightText: 2019 The CC: Tweaked Developers
|
||||
--
|
||||
-- SPDX-License-Identifier: LicenseRef-CCPL
|
||||
|
||||
local capture = require "test_helpers".capture_program
|
||||
|
||||
describe("The cd program", function()
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
-- SPDX-FileCopyrightText: 2019 The CC: Tweaked Developers
|
||||
--
|
||||
-- SPDX-License-Identifier: LicenseRef-CCPL
|
||||
|
||||
local capture = require "test_helpers".capture_program
|
||||
|
||||
describe("The clear program", function()
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
-- SPDX-FileCopyrightText: 2019 The CC: Tweaked Developers
|
||||
--
|
||||
-- SPDX-License-Identifier: LicenseRef-CCPL
|
||||
|
||||
local capture = require "test_helpers".capture_program
|
||||
|
||||
describe("The commands program", function()
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
-- SPDX-FileCopyrightText: 2019 The CC: Tweaked Developers
|
||||
--
|
||||
-- SPDX-License-Identifier: LicenseRef-CCPL
|
||||
|
||||
local capture = require "test_helpers".capture_program
|
||||
|
||||
describe("The exec program", function()
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
-- SPDX-FileCopyrightText: 2019 The CC: Tweaked Developers
|
||||
--
|
||||
-- SPDX-License-Identifier: LicenseRef-CCPL
|
||||
|
||||
local capture = require "test_helpers".capture_program
|
||||
|
||||
describe("The copy program", function()
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
-- SPDX-FileCopyrightText: 2019 The CC: Tweaked Developers
|
||||
--
|
||||
-- SPDX-License-Identifier: LicenseRef-CCPL
|
||||
|
||||
local capture = require "test_helpers".capture_program
|
||||
|
||||
describe("The rm program", function()
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
-- SPDX-FileCopyrightText: 2019 The CC: Tweaked Developers
|
||||
--
|
||||
-- SPDX-License-Identifier: LicenseRef-CCPL
|
||||
|
||||
local capture = require "test_helpers".capture_program
|
||||
|
||||
describe("The drive program", function()
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
-- SPDX-FileCopyrightText: 2019 The CC: Tweaked Developers
|
||||
--
|
||||
-- SPDX-License-Identifier: LicenseRef-CCPL
|
||||
|
||||
local capture = require "test_helpers".capture_program
|
||||
|
||||
describe("The edit program", function()
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
-- SPDX-FileCopyrightText: 2019 The CC: Tweaked Developers
|
||||
--
|
||||
-- SPDX-License-Identifier: LicenseRef-CCPL
|
||||
|
||||
local capture = require "test_helpers".capture_program
|
||||
|
||||
describe("The eject program", function()
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
-- SPDX-FileCopyrightText: 2019 The CC: Tweaked Developers
|
||||
--
|
||||
-- SPDX-License-Identifier: LicenseRef-CCPL
|
||||
|
||||
local capture = require "test_helpers".capture_program
|
||||
|
||||
describe("The exit program", function()
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
-- SPDX-FileCopyrightText: 2019 The CC: Tweaked Developers
|
||||
--
|
||||
-- SPDX-License-Identifier: LicenseRef-CCPL
|
||||
|
||||
local capture = require "test_helpers".capture_program
|
||||
|
||||
describe("The paint program", function()
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
-- SPDX-FileCopyrightText: 2019 The CC: Tweaked Developers
|
||||
--
|
||||
-- SPDX-License-Identifier: LicenseRef-CCPL
|
||||
|
||||
local capture = require "test_helpers".capture_program
|
||||
|
||||
describe("The dj program", function()
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
-- SPDX-FileCopyrightText: 2019 The CC: Tweaked Developers
|
||||
--
|
||||
-- SPDX-License-Identifier: LicenseRef-CCPL
|
||||
|
||||
local capture = require "test_helpers".capture_program
|
||||
|
||||
describe("The hello program", function()
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
-- SPDX-FileCopyrightText: 2019 The CC: Tweaked Developers
|
||||
--
|
||||
-- SPDX-License-Identifier: LicenseRef-CCPL
|
||||
|
||||
local capture = require "test_helpers".capture_program
|
||||
|
||||
describe("The gps program", function()
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
-- SPDX-FileCopyrightText: 2019 The CC: Tweaked Developers
|
||||
--
|
||||
-- SPDX-License-Identifier: LicenseRef-CCPL
|
||||
|
||||
local capture = require "test_helpers".capture_program
|
||||
local with_window_lines = require "test_helpers".with_window_lines
|
||||
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
-- SPDX-FileCopyrightText: 2019 The CC: Tweaked Developers
|
||||
--
|
||||
-- SPDX-License-Identifier: LicenseRef-CCPL
|
||||
|
||||
local capture = require "test_helpers".capture_program
|
||||
|
||||
describe("The pastebin program", function()
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
-- SPDX-FileCopyrightText: 2019 The CC: Tweaked Developers
|
||||
--
|
||||
-- SPDX-License-Identifier: LicenseRef-CCPL
|
||||
|
||||
local capture = require "test_helpers".capture_program
|
||||
|
||||
describe("The wget program", function()
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
-- SPDX-FileCopyrightText: 2019 The CC: Tweaked Developers
|
||||
--
|
||||
-- SPDX-License-Identifier: LicenseRef-CCPL
|
||||
|
||||
local capture = require "test_helpers".capture_program
|
||||
|
||||
describe("The id program", function()
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
-- SPDX-FileCopyrightText: 2022 The CC: Tweaked Developers
|
||||
--
|
||||
-- SPDX-License-Identifier: MPL-2.0
|
||||
|
||||
local with_window = require "test_helpers".with_window
|
||||
|
||||
describe("The import program", function()
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
-- SPDX-FileCopyrightText: 2019 The CC: Tweaked Developers
|
||||
--
|
||||
-- SPDX-License-Identifier: LicenseRef-CCPL
|
||||
|
||||
local capture = require "test_helpers".capture_program
|
||||
|
||||
describe("The label program", function()
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
-- SPDX-FileCopyrightText: 2019 The CC: Tweaked Developers
|
||||
--
|
||||
-- SPDX-License-Identifier: LicenseRef-CCPL
|
||||
|
||||
local capture = require "test_helpers".capture_program
|
||||
|
||||
describe("The list program", function()
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
-- SPDX-FileCopyrightText: 2019 The CC: Tweaked Developers
|
||||
--
|
||||
-- SPDX-License-Identifier: LicenseRef-CCPL
|
||||
|
||||
describe("The mkdir program", function()
|
||||
it("creates a directory", function()
|
||||
fs.delete("/test-files")
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
-- SPDX-FileCopyrightText: 2019 The CC: Tweaked Developers
|
||||
--
|
||||
-- SPDX-License-Identifier: LicenseRef-CCPL
|
||||
|
||||
local capture = require "test_helpers".capture_program
|
||||
|
||||
describe("The monitor program", function()
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
-- SPDX-FileCopyrightText: 2019 The CC: Tweaked Developers
|
||||
--
|
||||
-- SPDX-License-Identifier: LicenseRef-CCPL
|
||||
|
||||
local capture = require "test_helpers".capture_program
|
||||
|
||||
describe("The motd program", function()
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
-- SPDX-FileCopyrightText: 2019 The CC: Tweaked Developers
|
||||
--
|
||||
-- SPDX-License-Identifier: LicenseRef-CCPL
|
||||
|
||||
local capture = require "test_helpers".capture_program
|
||||
|
||||
describe("The move program", function()
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
-- SPDX-FileCopyrightText: 2019 The CC: Tweaked Developers
|
||||
--
|
||||
-- SPDX-License-Identifier: LicenseRef-CCPL
|
||||
|
||||
local capture = require "test_helpers".capture_program
|
||||
|
||||
describe("The peripherals program", function()
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
-- SPDX-FileCopyrightText: 2019 The CC: Tweaked Developers
|
||||
--
|
||||
-- SPDX-License-Identifier: LicenseRef-CCPL
|
||||
|
||||
local capture = require "test_helpers".capture_program
|
||||
|
||||
describe("The pocket equip program", function()
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
-- SPDX-FileCopyrightText: 2019 The CC: Tweaked Developers
|
||||
--
|
||||
-- SPDX-License-Identifier: LicenseRef-CCPL
|
||||
|
||||
local capture = require "test_helpers".capture_program
|
||||
|
||||
describe("The pocket unequip program", function()
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
-- SPDX-FileCopyrightText: 2019 The CC: Tweaked Developers
|
||||
--
|
||||
-- SPDX-License-Identifier: LicenseRef-CCPL
|
||||
|
||||
local capture = require "test_helpers".capture_program
|
||||
|
||||
describe("The programs program", function()
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
-- SPDX-FileCopyrightText: 2019 The CC: Tweaked Developers
|
||||
--
|
||||
-- SPDX-License-Identifier: LicenseRef-CCPL
|
||||
|
||||
local capture = require "test_helpers".capture_program
|
||||
|
||||
describe("The reboot program", function()
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
-- SPDX-FileCopyrightText: 2019 The CC: Tweaked Developers
|
||||
--
|
||||
-- SPDX-License-Identifier: LicenseRef-CCPL
|
||||
|
||||
local capture = require "test_helpers".capture_program
|
||||
|
||||
describe("The redstone program", function()
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
-- SPDX-FileCopyrightText: 2019 The CC: Tweaked Developers
|
||||
--
|
||||
-- SPDX-License-Identifier: LicenseRef-CCPL
|
||||
|
||||
local capture = require "test_helpers".capture_program
|
||||
|
||||
describe("The rename program", function()
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
-- SPDX-FileCopyrightText: 2019 The CC: Tweaked Developers
|
||||
--
|
||||
-- SPDX-License-Identifier: LicenseRef-CCPL
|
||||
|
||||
local capture = require "test_helpers".capture_program
|
||||
|
||||
describe("The set program", function()
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
-- SPDX-FileCopyrightText: 2019 The CC: Tweaked Developers
|
||||
--
|
||||
-- SPDX-License-Identifier: LicenseRef-CCPL
|
||||
|
||||
local with_window = require "test_helpers".with_window
|
||||
|
||||
describe("The shell", function()
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
-- SPDX-FileCopyrightText: 2019 The CC: Tweaked Developers
|
||||
--
|
||||
-- SPDX-License-Identifier: LicenseRef-CCPL
|
||||
|
||||
local capture = require "test_helpers".capture_program
|
||||
|
||||
describe("The shutdown program", function()
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user