3 # This file is part of Language::Ook.
4 # Copyright (c) 2002-2007 Jerome Quelin, all rights reserved.
6 # This program is free software; you can redistribute it and/or modify
7 # it under the same terms as Perl itself.
12 use File::Spec::Functions;
14 use POSIX qw! tmpnam !;
16 BEGIN { plan tests => 2 };
20 # Classic hello world.
21 my %tests = ( "hello.ook" => "Hello, world!\n",
22 "test.ook" => "1..1\nok 1\n",
24 for my $f ( sort keys %tests ) {
26 open OUT, ">$file" or die $!;
28 my $interp = new Language::Ook;
29 $interp->read_file( catfile( "examples", $f ) );
33 open OUT, "<$file" or die $!;
41 ok( $content, $tests{$f} );