summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2011-03-04 12:22:22 +0100
committerDaniel Friesel <derf@finalrewind.org>2011-03-04 12:22:22 +0100
commit1932c998cac488d6ba27789fea56bcf3a554a35c (patch)
tree39304ac27f408d58095d07634fbba6520efd5d21 /test
parente1e7a58aa6983261757affa1b146d6ce20742a69 (diff)
Switch from Makefile to Build.PL
Diffstat (limited to 'test')
-rwxr-xr-xtest/00-compile.t8
-rwxr-xr-xtest/10-pod-coverage.t8
-rwxr-xr-xtest/50-comirror.t59
-rwxr-xr-xtest/60-comirror-setup.t62
-rw-r--r--test/next-loop/1.jpg0
-rw-r--r--test/next-loop/1.xhtml14
-rw-r--r--test/next-loop/2.jpg0
-rw-r--r--test/next-loop/2.xhtml14
-rw-r--r--test/next-loop/3.jpg0
-rw-r--r--test/next-loop/3.xhtml14
-rw-r--r--test/next-loop/4.jpg0
-rw-r--r--test/next-loop/4.xhtml14
-rw-r--r--test/next-loop/5.jpg0
-rw-r--r--test/next-loop/5.xhtml14
-rw-r--r--test/next-none/1.jpg0
-rw-r--r--test/next-none/1.xhtml14
-rw-r--r--test/next-none/2.jpg0
-rw-r--r--test/next-none/2.xhtml14
-rw-r--r--test/next-none/3.jpg0
-rw-r--r--test/next-none/3.xhtml14
-rw-r--r--test/next-none/4.jpg0
-rw-r--r--test/next-none/4.xhtml14
-rw-r--r--test/next-none/5.jpg0
-rw-r--r--test/next-none/5.xhtml13
-rw-r--r--test/next-unicroak/1.jpg0
-rw-r--r--test/next-unicroak/1.xhtml14
-rw-r--r--test/next-unicroak/2.jpg0
-rw-r--r--test/next-unicroak/2.xhtml14
-rw-r--r--test/next-unicroak/3.jpg0
-rw-r--r--test/next-unicroak/3.xhtml14
-rw-r--r--test/next-unicroak/4.jpg0
-rw-r--r--test/next-unicroak/4.xhtml14
-rw-r--r--test/next-unicroak/5.jpg0
-rw-r--r--test/next-unicroak/5.xhtml13
34 files changed, 0 insertions, 345 deletions
diff --git a/test/00-compile.t b/test/00-compile.t
deleted file mode 100755
index d7b89cb..0000000
--- a/test/00-compile.t
+++ /dev/null
@@ -1,8 +0,0 @@
-#!/usr/bin/env perl
-use strict;
-use warnings;
-use 5.010;
-use Test::More;
-use Test::Compile;
-
-all_pl_files_ok(qw{ bin/comirror bin/comirror-setup });
diff --git a/test/10-pod-coverage.t b/test/10-pod-coverage.t
deleted file mode 100755
index df81177..0000000
--- a/test/10-pod-coverage.t
+++ /dev/null
@@ -1,8 +0,0 @@
-#!/usr/bin/env perl
-use strict;
-use warnings;
-use 5.010;
-use Test::More;
-use Test::Pod;
-
-all_pod_files_ok(qw{ bin/comirror bin/comirror-setup });
diff --git a/test/50-comirror.t b/test/50-comirror.t
deleted file mode 100755
index 8ccb334..0000000
--- a/test/50-comirror.t
+++ /dev/null
@@ -1,59 +0,0 @@
-#!/usr/bin/env perl
-use strict;
-use warnings;
-use 5.010;
-use Cwd;
-use Test::More tests => 26;
-use Test::Cmd;
-
-sub check_key {
- my ($test, $filetype, $key, $value) = @_;
- my @lines;
- $test->read(\@lines, "comirror.${filetype}");
-
- if(grep { $_ eq "$key\t$value\n" } @lines) {
- pass("${filetype}: ${key} = ${value}");
- }
- else {
- fail("${filetype}: ${key} = ${value}");
- }
-}
-
-for my $next_type (qw/ loop none /) {
-
- my $test = Test::Cmd->new( prog => 'bin/comirror', workdir => q{} );
- my $cwd = $test->workdir();
-
- my $next_base = 'file://' . getcwd() . "/test/next-${next_type}";
- my ($str, $exit);
-
- ok($test, "Create Test::Cmd object ($next_type)");
-
- $test->write('comirror.conf', "image_re\t${next_base}/.+\n");
-
- $exit = $test->run(
- chdir => $cwd,
- args => "${next_base}/1.xhtml",
- );
-
- ok($exit == 0, 'First run: return 0');
-
- isnt($test->stdout, q{}, 'First run: Non-empty stdout');
- is ($test->stderr, q{}, 'First run: Empty stderr');
-
- check_key($test, 'state', 'uri', "${next_base}/4.xhtml");
-
- for my $i (1 .. 5) {
- ok(-e "$cwd/$i.jpg",
- "$i.jpg was downloaded successfully ($next_type)");
- }
-
- $exit = $test->run(
- chdir => $cwd,
- );
-
- ok(($exit >> 8) == 1, 'Second run: return 1 (no new images loaded)');
-
- isnt($test->stdout, q{}, 'Second run: Non-empty stdout');
- is ($test->stderr, q{}, 'Second run: Empty stderr');
-}
diff --git a/test/60-comirror-setup.t b/test/60-comirror-setup.t
deleted file mode 100755
index a3ac27c..0000000
--- a/test/60-comirror-setup.t
+++ /dev/null
@@ -1,62 +0,0 @@
-#!/usr/bin/env perl
-use strict;
-use warnings;
-use 5.010;
-use Cwd;
-use Test::More tests => 18;
-use Test::Cmd;
-
-my $test;
-
-sub check_key {
- my ($filetype, $key, $value) = @_;
- my @lines;
- $test->read(\@lines, "comirror.${filetype}");
-
- if(grep { $_ eq "$key\t$value\n" } @lines) {
- pass("${filetype}: ${key} = ${value}");
- }
- else {
- fail("${filetype}: ${key} = ${value}");
- }
-}
-
-for my $test_type (qw/loop unicroak/) {
-
- $test = Test::Cmd->new( prog => 'bin/comirror-setup', workdir => q{} );
- my $cwd = $test->workdir();
-
- my $next_base = 'file://' . getcwd() . "/test/next-${test_type}";
- my ($str, $exit);
- my @links;
-
- ok($test, 'Create Test::Cmd object');
-
- $exit = $test->run(
- chdir => $cwd
- );
-
- ok($exit != 0, 'Not enough arguments: non-zero return');
-
- is ($test->stdout, q{}, 'Not enough arguments: Nothing to stdout');
- isnt($test->stderr, q{}, 'Not enough arguments: Something to stderr');
-
- for my $i (1 .. 5) {
- push(@links, "${next_base}/${i}.xhtml");
- }
-
- $exit = $test->run(
- chdir => $cwd,
- args => '--batch ' . join(q{ }, @links[0, 1, 3]),
- );
-
- ok($exit == 0, 'Correct usage: return zero');
-
- isnt($test->stdout, q{}, 'Correct usage: Something to stdout');
- is ($test->stderr, q{}, 'Correct usage: Nothing to stderr');
-
- check_key('state', 'uri', $links[0]);
-
- check_key('conf', 'image_re', "${next_base}/.+");
-
-}
diff --git a/test/next-loop/1.jpg b/test/next-loop/1.jpg
deleted file mode 100644
index e69de29..0000000
--- a/test/next-loop/1.jpg
+++ /dev/null
diff --git a/test/next-loop/1.xhtml b/test/next-loop/1.xhtml
deleted file mode 100644
index c0efc65..0000000
--- a/test/next-loop/1.xhtml
+++ /dev/null
@@ -1,14 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
- "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
-<head>
- <title></title>
- <meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
-</head>
-<body>
-<div>
- <img src="1.jpg"/>
- <a href="2.xhtml">Next =></a>
-</div>
-</body>
-</html>
diff --git a/test/next-loop/2.jpg b/test/next-loop/2.jpg
deleted file mode 100644
index e69de29..0000000
--- a/test/next-loop/2.jpg
+++ /dev/null
diff --git a/test/next-loop/2.xhtml b/test/next-loop/2.xhtml
deleted file mode 100644
index 60e57e1..0000000
--- a/test/next-loop/2.xhtml
+++ /dev/null
@@ -1,14 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
- "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
-<head>
- <title></title>
- <meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
-</head>
-<body>
-<div>
- <img src="2.jpg"/>
- <a href="3.xhtml">Next =></a>
-</div>
-</body>
-</html>
diff --git a/test/next-loop/3.jpg b/test/next-loop/3.jpg
deleted file mode 100644
index e69de29..0000000
--- a/test/next-loop/3.jpg
+++ /dev/null
diff --git a/test/next-loop/3.xhtml b/test/next-loop/3.xhtml
deleted file mode 100644
index 97eadf4..0000000
--- a/test/next-loop/3.xhtml
+++ /dev/null
@@ -1,14 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
- "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
-<head>
- <title></title>
- <meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
-</head>
-<body>
-<div>
- <img src="3.jpg"/>
- <a href="4.xhtml">Next =></a>
-</div>
-</body>
-</html>
diff --git a/test/next-loop/4.jpg b/test/next-loop/4.jpg
deleted file mode 100644
index e69de29..0000000
--- a/test/next-loop/4.jpg
+++ /dev/null
diff --git a/test/next-loop/4.xhtml b/test/next-loop/4.xhtml
deleted file mode 100644
index b0cf520..0000000
--- a/test/next-loop/4.xhtml
+++ /dev/null
@@ -1,14 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
- "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
-<head>
- <title></title>
- <meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
-</head>
-<body>
-<div>
- <img src="4.jpg"/>
- <a href="5.xhtml">Next =></a>
-</div>
-</body>
-</html>
diff --git a/test/next-loop/5.jpg b/test/next-loop/5.jpg
deleted file mode 100644
index e69de29..0000000
--- a/test/next-loop/5.jpg
+++ /dev/null
diff --git a/test/next-loop/5.xhtml b/test/next-loop/5.xhtml
deleted file mode 100644
index 86ff9e8..0000000
--- a/test/next-loop/5.xhtml
+++ /dev/null
@@ -1,14 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
- "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
-<head>
- <title></title>
- <meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
-</head>
-<body>
-<div>
- <img src="5.jpg"/>
- <a href="5.xhtml">Next =></a>
-</div>
-</body>
-</html>
diff --git a/test/next-none/1.jpg b/test/next-none/1.jpg
deleted file mode 100644
index e69de29..0000000
--- a/test/next-none/1.jpg
+++ /dev/null
diff --git a/test/next-none/1.xhtml b/test/next-none/1.xhtml
deleted file mode 100644
index c0efc65..0000000
--- a/test/next-none/1.xhtml
+++ /dev/null
@@ -1,14 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
- "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
-<head>
- <title></title>
- <meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
-</head>
-<body>
-<div>
- <img src="1.jpg"/>
- <a href="2.xhtml">Next =></a>
-</div>
-</body>
-</html>
diff --git a/test/next-none/2.jpg b/test/next-none/2.jpg
deleted file mode 100644
index e69de29..0000000
--- a/test/next-none/2.jpg
+++ /dev/null
diff --git a/test/next-none/2.xhtml b/test/next-none/2.xhtml
deleted file mode 100644
index 60e57e1..0000000
--- a/test/next-none/2.xhtml
+++ /dev/null
@@ -1,14 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
- "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
-<head>
- <title></title>
- <meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
-</head>
-<body>
-<div>
- <img src="2.jpg"/>
- <a href="3.xhtml">Next =></a>
-</div>
-</body>
-</html>
diff --git a/test/next-none/3.jpg b/test/next-none/3.jpg
deleted file mode 100644
index e69de29..0000000
--- a/test/next-none/3.jpg
+++ /dev/null
diff --git a/test/next-none/3.xhtml b/test/next-none/3.xhtml
deleted file mode 100644
index 97eadf4..0000000
--- a/test/next-none/3.xhtml
+++ /dev/null
@@ -1,14 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
- "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
-<head>
- <title></title>
- <meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
-</head>
-<body>
-<div>
- <img src="3.jpg"/>
- <a href="4.xhtml">Next =></a>
-</div>
-</body>
-</html>
diff --git a/test/next-none/4.jpg b/test/next-none/4.jpg
deleted file mode 100644
index e69de29..0000000
--- a/test/next-none/4.jpg
+++ /dev/null
diff --git a/test/next-none/4.xhtml b/test/next-none/4.xhtml
deleted file mode 100644
index b0cf520..0000000
--- a/test/next-none/4.xhtml
+++ /dev/null
@@ -1,14 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
- "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
-<head>
- <title></title>
- <meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
-</head>
-<body>
-<div>
- <img src="4.jpg"/>
- <a href="5.xhtml">Next =></a>
-</div>
-</body>
-</html>
diff --git a/test/next-none/5.jpg b/test/next-none/5.jpg
deleted file mode 100644
index e69de29..0000000
--- a/test/next-none/5.jpg
+++ /dev/null
diff --git a/test/next-none/5.xhtml b/test/next-none/5.xhtml
deleted file mode 100644
index 41012d9..0000000
--- a/test/next-none/5.xhtml
+++ /dev/null
@@ -1,13 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
- "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
-<head>
- <title></title>
- <meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
-</head>
-<body>
-<div>
- <img src="5.jpg"/>
-</div>
-</body>
-</html>
diff --git a/test/next-unicroak/1.jpg b/test/next-unicroak/1.jpg
deleted file mode 100644
index e69de29..0000000
--- a/test/next-unicroak/1.jpg
+++ /dev/null
diff --git a/test/next-unicroak/1.xhtml b/test/next-unicroak/1.xhtml
deleted file mode 100644
index 9753197..0000000
--- a/test/next-unicroak/1.xhtml
+++ /dev/null
@@ -1,14 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
- "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
-<head>
- <title></title>
- <meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
-</head>
-<body>
-<div>
- <img src="1.jpg"/>
- <a href="2.xhtml">Next →</a>
-</div>
-</body>
-</html>
diff --git a/test/next-unicroak/2.jpg b/test/next-unicroak/2.jpg
deleted file mode 100644
index e69de29..0000000
--- a/test/next-unicroak/2.jpg
+++ /dev/null
diff --git a/test/next-unicroak/2.xhtml b/test/next-unicroak/2.xhtml
deleted file mode 100644
index b3c3969..0000000
--- a/test/next-unicroak/2.xhtml
+++ /dev/null
@@ -1,14 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
- "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
-<head>
- <title></title>
- <meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
-</head>
-<body>
-<div>
- <img src="2.jpg"/>
- <a href="3.xhtml">Next →</a>
-</div>
-</body>
-</html>
diff --git a/test/next-unicroak/3.jpg b/test/next-unicroak/3.jpg
deleted file mode 100644
index e69de29..0000000
--- a/test/next-unicroak/3.jpg
+++ /dev/null
diff --git a/test/next-unicroak/3.xhtml b/test/next-unicroak/3.xhtml
deleted file mode 100644
index b0488cf..0000000
--- a/test/next-unicroak/3.xhtml
+++ /dev/null
@@ -1,14 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
- "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
-<head>
- <title></title>
- <meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
-</head>
-<body>
-<div>
- <img src="3.jpg"/>
- <a href="4.xhtml">Next →</a>
-</div>
-</body>
-</html>
diff --git a/test/next-unicroak/4.jpg b/test/next-unicroak/4.jpg
deleted file mode 100644
index e69de29..0000000
--- a/test/next-unicroak/4.jpg
+++ /dev/null
diff --git a/test/next-unicroak/4.xhtml b/test/next-unicroak/4.xhtml
deleted file mode 100644
index 844854e..0000000
--- a/test/next-unicroak/4.xhtml
+++ /dev/null
@@ -1,14 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
- "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
-<head>
- <title></title>
- <meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
-</head>
-<body>
-<div>
- <img src="4.jpg"/>
- <a href="5.xhtml">Next →</a>
-</div>
-</body>
-</html>
diff --git a/test/next-unicroak/5.jpg b/test/next-unicroak/5.jpg
deleted file mode 100644
index e69de29..0000000
--- a/test/next-unicroak/5.jpg
+++ /dev/null
diff --git a/test/next-unicroak/5.xhtml b/test/next-unicroak/5.xhtml
deleted file mode 100644
index 41012d9..0000000
--- a/test/next-unicroak/5.xhtml
+++ /dev/null
@@ -1,13 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
- "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
-<head>
- <title></title>
- <meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
-</head>
-<body>
-<div>
- <img src="5.jpg"/>
-</div>
-</body>
-</html>