UNPKG

meld-spec

Version:

Specification for the Meld scripting language

54 lines (53 loc) 1.57 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.commentTests = void 0; /** * Test cases for comments that all implementations must pass */ exports.commentTests = [ { name: 'single-comment', input: '>> This is a comment', expected: { type: 'Comment', content: 'This is a comment' }, description: 'Basic single-line comment' }, { name: 'multiple-comments', input: '>> First comment\n>> Second comment', expected: { type: 'Comment', content: 'First comment' }, description: 'First of multiple consecutive comments' }, { name: 'comment-with-directive-like', input: '>> This looks like @text but is a comment', expected: { type: 'Comment', content: 'This looks like @text but is a comment' }, description: 'Comment containing directive-like syntax' }, { name: 'comment-with-variable-like', input: '>> Comment with ${var} and #{data}', expected: { type: 'Comment', content: 'Comment with ${var} and #{data}' }, description: 'Comment containing variable-like syntax' }, { name: 'comment-between-directives', input: '@text msg = "Hello"\n>> A comment\n@text msg2 = "World"', expected: { type: 'Comment', content: 'A comment' }, description: 'Comment between directives' } ];