<commit_before>#!perl
# Copyright (C) 2008, The Perl Foundation.
# $Id$

use lib "../../lib";
use Parrot::Test tests => 10;

pirc_2_pasm_is(<<'CODE', <<'OUTPUT', "a single const declaration");
.const int x = 42
CODE
OUTPUT


pirc_2_pasm_is(<<'CODE', <<'OUTPUT', "a single namespace declaration");
.namespace []
CODE
OUTPUT

pirc_2_pasm_is(<<'CODE', <<'OUTPUT', "multiple namespace declaration");
.namespace ['X';'Z']
.namespace ['A';'B']
CODE
OUTPUT

pirc_2_pasm_is(<<'CODE', <<'OUTPUT', "other chunks");
.HLL "FOO"
.HLL_map "Integer" = "Float"
.loadlib "../../../dan_ops"
.line 42
.file "somefile.pir"
CODE
OUTPUT


pirc_2_pasm_is(<<'CODE', <<'OUTPUT', "test a basic :main sub");
.sub main :main
.end
CODE
.namespace []
.pcc_sub :main main:
    end
OUTPUT

pirc_2_pasm_is(<<'CODE', <<'OUTPUT', "test a normal basic sub");
.sub main
.end
CODE
.namespace []
main:
    set_returns 1
    returncc
OUTPUT


pirc_2_pasm_is(<<'CODE', <<'OUTPUT', "test sub with sub pragmas");
.sub main :load :init :immediate :postcomp :anon :multi
.end
CODE
.namespace []
.pcc_sub main:
    set_returns 1
    returncc<commit_msg>[pirc] fix syntax error in test file.<commit_after>#!perl
# Copyright (C) 2008, The Perl Foundation.
# $Id$

use lib "../../lib";
use Parrot::Test tests => 10;

pirc_2_pasm_is(<<'CODE', <<'OUTPUT', "a single const declaration");
.const int x = 42
CODE
OUTPUT


pirc_2_pasm_is(<<'CODE', <<'OUTPUT', "a single namespace declaration");
.namespace []
CODE
OUTPUT

pirc_2_pasm_is(<<'CODE', <<'OUTPUT', "multiple namespace declaration");
.namespace ['X';'Z']
.namespace ['A';'B']
CODE
OUTPUT

pirc_2_pasm_is(<<'CODE', <<'OUTPUT', "other chunks");
.HLL "FOO"
.HLL_map "Integer" = "Float"
.loadlib "../../../dan_ops"
.line 42
.file "somefile.pir"
CODE
OUTPUT


pirc_2_pasm_is(<<'CODE', <<'OUTPUT', "test a basic :main sub");
.sub main :main
.end
CODE
.namespace []
.pcc_sub :main main:
    end
OUTPUT

pirc_2_pasm_is(<<'CODE', <<'OUTPUT', "test a normal basic sub");
.sub main
.end
CODE
.namespace []
main:
    set_returns 1
    returncc
OUTPUT


pirc_2_pasm_is(<<'CODE', <<'OUTPUT', "test sub with sub pragmas");
.sub main :load :init :immediate :postcomp :anon :multi()
.end
CODE
.namespace []
.pcc_sub main:
    set_returns 1
    returncc
{'fraction_non_alphanumeric': 0.18794642857142857, 'fraction_numerical': 0.016964285714285713, 'mean_word_length': 4.547029702970297, 'pattern_counts': {'":': 0, '<': 59, '<?xml version=': 0, '>': 5, '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': '7426611', 'n_tokens_mistral': 906, 'n_tokens_neox': 857, 'n_words': 249}