<commit_before># $Id$

=head1 NAME

pipp/t/comments.t - tests for Pipp

=head1 DESCRIPTION

Testing comments in code.

=cut

# pragmata
use strict;
use warnings;

use FindBin;
use lib "$FindBin::Bin/../../lib";

# core Perl modules
use Test::More     tests => 5;

# Parrot modules
use Parrot::Test;

language_output_is( 'Pipp', <<'CODE', <<'OUT', 'end of line comment //' );
<script language="php">
echo "Hello, World!\n";   // comment till end of line
</script>
CODE
Hello, World!
OUT


language_output_is( 'Pipp', <<'CODE', <<'OUT', 'single line /* */ comment' );
<script language="php">
echo "Hello, World!\n";   /* comment till end of line */
</script>
CODE
Hello, World!
OUT

language_output_is( 'Pipp', <<'CODE', <<'OUT', 'multi line /* */ comment' );
<script language="php">
echo "Hello, World!\n";   /* multi
    line
    comment
*/
</script>
CODE
Hello, World!
OUT

language_output_is( 'Pipp', <<'CODE', <<'OUT', 'three end of line comments', todo => 'broken' );
<?php
//
//
//
echo "asdf\n";
?>
CODE
asdf
OUT

language_output_is( 'Pipp', <<'CODE', <<'OUT', 'end of line comment #' );
<script language="php">
echo "Hello, World!\n";   # comment till end of line
</script>
CODE
Hello, World!
OUT<commit_msg>[Pipp] More TODO test cases with three end of line comments<commit_after># $Id$

=head1 NAME

pipp/t/comments.t - tests for Pipp

=head1 DESCRIPTION

Testing comments in code.

=cut

# pragmata
use strict;
use warnings;

use FindBin;
use lib "$FindBin::Bin/../../lib";

# core Perl modules
use Test::More     tests => 10;

# Parrot modules
use Parrot::Test;

language_output_is( 'Pipp', <<'CODE', <<'OUT', 'end of line comment //' );
<script language="php">
echo "Hello, World!\n";   // comment till end of line
</script>
CODE
Hello, World!
OUT


language_output_is( 'Pipp', <<'CODE', <<'OUT', 'single line /* */ comment' );
<script language="php">
echo "Hello, World!\n";   /* comment till end of line */
</script>
CODE
Hello, World!
OUT

language_output_is( 'Pipp', <<'CODE', <<'OUT', 'multi line /* */ comment' );
<script language="php">
echo "Hello, World!\n";   /* multi
    line
    comment
*/
</script>
CODE
Hello, World!
OUT

language_output_is( 'Pipp', <<'CODE', <<'OUT', 'two // comments' );
<?php
//
//
echo "asdf\n";
?>
CODE
asdf
OUT

language_output_is( 'Pipp', <<'CODE', <<'OUT', 'three // comments', todo => 'broken' );
<?php
//
//
//
echo "asdf\n";
?>
CODE
asdf
OUT

language_output_is( 'Pipp', <<'CODE', <<'OUT', 'two # comments' );
<?php
#
#
echo "asdf\n";
?>
CODE
asdf
OUT

language_output_is( 'Pipp', <<'CODE', <<'OUT', 'three # comments', todo => 'broken' );
<?php
#
#
#
echo "asdf\n";
?>
CODE
asdf
OUT

language_output_is( 'Pipp', <<'CODE', <<'OUT', 'one # and one // comment' );
<?php
#
//
echo "asdf\n";
?>
CODE
asdf
OUT

language_output_is( 'Pipp', <<'CODE', <<'OUT', 'one # and two // comments', todo => 'broken' );
<?php
#
//
//
echo "asdf\n";
?>
CODE
asdf
OUT

language_output_is( 'Pipp', <<'CODE', <<'OUT', 'end of line comment #' );
<script language="php">
echo "Hello, World!\n";   # comment till end of line
</script>
CODE
Hello, World!
OUT
{'fraction_non_alphanumeric': 0.20829284094590217, 'fraction_numerical': 0.0022675736961451248, 'mean_word_length': 3.9967637540453076, 'pattern_counts': {'":': 0, '<': 86, '<?xml version=': 0, '>': 32, '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': '4602727', 'n_tokens_mistral': 1165, 'n_tokens_neox': 1144, 'n_words': 356}