UNPKG

meld-spec

Version:

Specification for the Meld scripting language

54 lines (53 loc) 1.52 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.commentInvalidTests = void 0; /** * Test cases for invalid comments that all implementations must reject */ exports.commentInvalidTests = [ { name: 'indented-comment', input: ' >> Indented comment', expected: { type: 'Error', error: 'Comments cannot be indented' }, description: 'Comments must start at beginning of line' }, { name: 'missing-space', input: '>>No space after arrows', expected: { type: 'Error', error: 'Comments must have a space after >>' }, description: 'Comments require space after >>' }, { name: 'single-arrow', input: '> Not a valid comment', expected: { type: 'Error', error: 'Comments must start with >>' }, description: 'Single > is not a valid comment' }, { name: 'triple-arrow', input: '>>> Too many arrows', expected: { type: 'Error', error: 'Comments must start with >>' }, description: 'More than two > is not valid' }, { name: 'comment-after-directive', input: '@text msg = "Hello" >> Invalid comment location', expected: { type: 'Error', error: 'Comments must be on their own line' }, description: 'Comments cannot appear after directives' } ];