<commit_before>#!/usr/bin/perl

use strict;
use lib qw(tcl/lib ./lib ../lib ../../lib ../../../lib);
use Parrot::Test tests => 5;
use Test::More;

language_output_is("tcl",<<'TCL',<<OUT,"append nothing");
  set a [list a b]
  lappend a 
  puts $a
TCL
a b
OUT

language_output_is("tcl",<<'TCL',<<OUT,"append one");
  set a [list a b]
  lappend a c
  puts $a
TCL
a b c
OUT

language_output_is("tcl",<<'TCL',<<OUT,"append multiple");
  set a [list a b]
  lappend a c d e f g
  puts $a
TCL
a b c d e f g
OUT

language_output_is("tcl", <<'TCL', <<'OUT', "new variable");
  puts [lappend x 1]
TCL
1
OUT

language_output_is('tcl', <<'TCL', <<'OUT', 'wrong # args error');
  lappend
TCL
wrong # args: should be "lappend varName ?value value ...?"
OUT<commit_msg>[tcl] convert [lappend] tests to test_more style<commit_after>#!../../parrot tcl.pbc

source lib/test_more.tcl
plan 5

eval_is {
  set a [list a b]
  lappend a 
  set a
} {a b} {append nothing}

eval_is {
  set a [list a b]
  lappend a c
  set a
} {a b c} {append one}

eval_is {
  set a [list a b]
  lappend a c d e f g
  set a
} {a b c d e f g} {append multiple}

is [lappend x 1] 1 {new variable}

eval_is {lappend} \
  {wrong # args: should be "lappend varName ?value value ...?"} \
  {no args}
{'fraction_non_alphanumeric': 0.16693290734824281, 'fraction_numerical': 0.004792332268370607, 'mean_word_length': 3.190635451505017, 'pattern_counts': {'":': 0, '<': 23, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4797217', 'n_tokens_mistral': 534, 'n_tokens_neox': 521, 'n_words': 186}