Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Give up on unified languages testing for eclectus.
Add eclectus.pl, starting from test-wrapper.pl
  • Loading branch information
bschmalhofer committed Feb 8, 2009
1 parent 58bd15f commit d15a006
Show file tree
Hide file tree
Showing 18 changed files with 9 additions and 276 deletions.
12 changes: 4 additions & 8 deletions docs/eclectus.pod
Expand Up @@ -24,21 +24,17 @@ Going through the tutorial.

Tests are written in Scheme. The test-driver is derived from the tutorial,
tweaked to emit TAP.
There are Perl 5 wrappers for the scheme test scripts, in order to allow
unified languages testing.

The F<t/*.pl> scripts are used in unified languages testing. They
are executing the respective F<t/*.t> Scheme scripts. In
unified languages testing the Eclectus tests are skipped, when
the is no 'gauche 0.8' around.

Run individual test scripts with e.g.:

gosh -fcase-fold -I . -I riaxpander -l gauche/prelude.scm t/unary_primitives.t

Or use the Perl-Wrapper for selecting the appropriate program and options.

perl eclectus.pl t/unary_primitives.t

=head1 TODO

- Bring Eclectus back to unified languages testing
- support for strings
- support for pairs
- support for 'letrec
Expand Down
17 changes: 5 additions & 12 deletions test-wrapper.pl → eclectus.pl
@@ -1,35 +1,31 @@
#! perl

# Copyright (C) 2007-2008, The Perl Foundation.
# Copyright (C) 2007-2009, The Perl Foundation.
# $Id$

# A wrapper around a Scheme test file
# A wrapper for running scheme scripts with Eclectus

use strict;
use warnings;

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

use Test::More;
use Data::Dumper;

( my $t_fn = $FindBin::Script ) =~ s/\.pl$/\.t/;
my ( $scheme_fn ) = @ARGV;


if ($^O eq 'MSWin32') {
# 'petite' is Petite Chez Scheme
# 7.4 is the current version
my $petite_version = `petite --version 2>&1` || q{};
my $has_petite = $petite_version =~ /^7.4/;
#diag( Dumper( $petite_version, $has_petite ) );

if ( ! $has_petite ) {
plan skip_all => 'petite 7.4 is needed for running this test';
}
else {
chdir 'eclectus';
exec 'petite', '--script', "t/$t_fn";
exec 'petite', '--script', $scheme_fn;
}
}
else {
Expand All @@ -38,14 +34,11 @@
my $gauche_version = `gosh -V 2>&1` || q{};
my $has_gauche = $gauche_version =~ m/ 0\.8 # inexact version
/xms;
#diag( Dumper( $gauche_version, $has_gauche ) );

if ( ! $has_gauche ) {
plan skip_all => 'gauche 0.8 is needed for running this test';
}
else {
chdir 'eclectus';
exec 'gosh', '-fcase-fold', '-I', '.', '-l', 'gauche/prelude.scm', "t/$t_fn";
exec 'gosh', '-fcase-fold', '-I', '.', '-l', 'gauche/prelude.scm', $scheme_fn;
}
}

Expand Down
16 changes: 0 additions & 16 deletions t/begin.pl

This file was deleted.

16 changes: 0 additions & 16 deletions t/binary_primitives.pl

This file was deleted.

16 changes: 0 additions & 16 deletions t/booleans.pl

This file was deleted.

16 changes: 0 additions & 16 deletions t/characters.pl

This file was deleted.

16 changes: 0 additions & 16 deletions t/conditionals.pl

This file was deleted.

16 changes: 0 additions & 16 deletions t/empty_list.pl

This file was deleted.

16 changes: 0 additions & 16 deletions t/equality.pl

This file was deleted.

16 changes: 0 additions & 16 deletions t/integers.pl

This file was deleted.

16 changes: 0 additions & 16 deletions t/io.pl

This file was deleted.

16 changes: 0 additions & 16 deletions t/learning_scheme.pl

This file was deleted.

16 changes: 0 additions & 16 deletions t/local_variables.pl

This file was deleted.

16 changes: 0 additions & 16 deletions t/pair.pl

This file was deleted.

16 changes: 0 additions & 16 deletions t/procedures.pl

This file was deleted.

16 changes: 0 additions & 16 deletions t/strings.pl

This file was deleted.

16 changes: 0 additions & 16 deletions t/unary_primitives.pl

This file was deleted.

16 changes: 0 additions & 16 deletions t/vectors.pl

This file was deleted.

0 comments on commit d15a006

Please sign in to comment.