aboutsummaryrefslogtreecommitdiff
path: root/SBO-Lib/t
diff options
context:
space:
mode:
Diffstat (limited to 'SBO-Lib/t')
-rw-r--r--SBO-Lib/t/SBO-Lib.t18
-rwxr-xr-xSBO-Lib/t/versions.t116
2 files changed, 0 insertions, 134 deletions
diff --git a/SBO-Lib/t/SBO-Lib.t b/SBO-Lib/t/SBO-Lib.t
deleted file mode 100644
index 1c5866b..0000000
--- a/SBO-Lib/t/SBO-Lib.t
+++ /dev/null
@@ -1,18 +0,0 @@
-# Before `make install' is performed this script should be runnable with
-# `make test'. After `make install' it should work as `perl SBO-Lib.t'
-
-#########################
-
-# change 'tests => 1' to 'tests => last_test_to_print';
-
-use strict;
-use warnings;
-
-use Test::More tests => 1;
-BEGIN { use_ok('SBO::Lib') };
-
-#########################
-
-# Insert your test code below, the Test::More module is use()ed here so read
-# its man page ( perldoc Test::More ) for help writing this test script.
-
diff --git a/SBO-Lib/t/versions.t b/SBO-Lib/t/versions.t
deleted file mode 100755
index 5793bdc..0000000
--- a/SBO-Lib/t/versions.t
+++ /dev/null
@@ -1,116 +0,0 @@
-#!/usr/bin/perl
-#$Id: versions.t,v 1.9 2003/08/24 22:33:03 ed Exp $
-
-use 5.006;
-use strict;
-use warnings;
-
-use Sort::Versions;
-use Test::More;
-
-my @tests;
-
-while(<DATA>) {
- if(/^\s*(\S+)\s*([<>])\s*(\S+)\s*$/) {
- push @tests, $1,$3 if $2 eq "<";
- push @tests, $3,$1 if $2 eq ">";
- }
-}
-
-plan tests => (@tests / 2 * 3) + 3;
-
-my @l = sort versions qw(1.2 1.2a);
-is($l[0], "1.2");
-
-@l = sort { versioncmp($a, $b) } qw(1.2 1.2a);
-is($l[0], "1.2");
-
-SKIP: {
- skip "requires perl 5.6.0", 1 unless ($] >= 5.006);
- @l = sort versioncmp qw(1.2 1.2a);
- is($l[0], "1.2");
-}
-
-my $i=4;
-while (@tests) {
- ($a, $b) = @tests[0, 1];
-
- # Test both the versioncmp() and versions() interfaces, in both
- # the main package and other packages.
- #
- is(versions(), -1, "versions($a, $b)");
- $i++;
-
- is(versioncmp($a, $b), -1, "versioncmp($a, $b)");
- $i++;
-
- undef $a; undef $b; # just in case
-
- eval {
- package Foo;
- use Sort::Versions;
- ($a, $b) = @tests[0, 1];
-
- if (versions() != -1) {
- die "failed versions() in foreign package";
- }
-
- if (versioncmp($a, $b) != -1) {
- die "failed versioncmp() in foreign package";
- }
- };
- if ($@) {
- fail($@);
- }
- else {
- pass("foreign package tests ($tests[0], $tests[1])");
- }
-
- shift @tests; shift @tests;
-}
-
-
-__END__
-
-# Simple . only tests
-1.2 < 1.3
-1.2 < 1.2.1
-1.2.1 < 1.3
-1.2 < 1.2a
-1.2a < 1.3
-1.2 < 1.2.b
-1.2.1 < 1.2a
-1.2.b < 1.2a
-
-# Assorted non-numerics
-a < b
-a < a.b
-a.b < a.c
-a.1 < a.a
-1 < a
-1a < a
-1a < 2
-
-# Null version point
-1..1 < 1.1.1
-
-# Leading 0 tests
-1 > 0002
-1.5 > 1.06
-
-# Handling mixed -. versions
-1 < 1-1
-1-1 < 1-2
-1-2 < 1.2
-1-2 < 1.0-1
-1-2 < 1.0
-1-2 < 1.3
-1.2-1 < 1.2a-1
-1.3-4.6-7 < 1.3-4.8
-1.3-4.6-7 < 1.3-4.6.7
-1.3-4a-7 < 1.3-4a-7.4
-
-# 'Bug' reported by pgw99
-1.2-1 < 1.2.1-1
-1.2.1-1 < 1.2.1-2
-1.2.1-2 < 1.3.0-1