Skip to content
ChristophLHR edited this page Jul 4, 2024 · 3 revisions

Intro

To test you CC-Scripts, you might need some features, which are not available in standard lua. For that reason, we build some scripts to emulate CC-Features.

Installation

GitHub Actions (Running in Linux)

    # your previous steps
    #...
    - name: get SCM
      run: |
        wget https://github.com/mc-cc-scripts/TestSuite-lib/master/installSuit.lua -O tmp.lua
        chmod +x tmp.lua
        lua tmp.lua
        rm tmp.lua
    
    # the testCode, f.e. busted
    - name:
        run: |
        busted .

Locally you can just get the files and add them to your .gitignore file, as to not clutter your Repo

Usage

-- Require f.e. vectorSuit
vector = require('./vector/vector.lua')
-- Remember to use the variablename that is used in the script you want to test
-- which is usally the global one defined by CC!
Clone this wiki locally