From ded0e7d1400751d3c489859d6b5bb6a7ca7340f6 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Wed, 27 Apr 2011 18:44:09 +0200 Subject: Add some initial tests --- t/50-integration.t | 26 ++++++++++++++++++++++++++ t/in/1023k | Bin 0 -> 1047552 bytes t/in/1024k | Bin 0 -> 1048576 bytes t/in/1025k | Bin 0 -> 1049600 bytes t/in/1k | Bin 0 -> 1024 bytes t/in/4 | 1 + t/in/4096k | Bin 0 -> 4194304 bytes 7 files changed, 27 insertions(+) create mode 100644 t/50-integration.t create mode 100644 t/in/1023k create mode 100644 t/in/1024k create mode 100644 t/in/1025k create mode 100644 t/in/1k create mode 100644 t/in/4 create mode 100644 t/in/4096k diff --git a/t/50-integration.t b/t/50-integration.t new file mode 100644 index 0000000..1219323 --- /dev/null +++ b/t/50-integration.t @@ -0,0 +1,26 @@ +#!/usr/bin/env perl +use strict; +use warnings; +use 5.010; +use autodie; + +use Cwd; +use Test::Command tests => 6; + +my $hashl = '../../bin/hashl'; + +my $EMPTY = q{}; +my $usage = <<'EOF'; +Usage: ../../bin/hashl [options] [args] +See 'perldoc -F ../../bin/hashl' (or 'man hashl' if it is properly installed) +EOF + +chdir('t/in'); + +for my $cmd ("$hashl", "$hashl copy") { + my $tc = Test::Command->new(cmd => $cmd); + + $tc->exit_isnt_num(0); + $tc->stdout_is_eq($EMPTY); + $tc->stderr_is_eq($usage); +} diff --git a/t/in/1023k b/t/in/1023k new file mode 100644 index 0000000..52cdbc8 Binary files /dev/null and b/t/in/1023k differ diff --git a/t/in/1024k b/t/in/1024k new file mode 100644 index 0000000..2315abf Binary files /dev/null and b/t/in/1024k differ diff --git a/t/in/1025k b/t/in/1025k new file mode 100644 index 0000000..7bcdb6c Binary files /dev/null and b/t/in/1025k differ diff --git a/t/in/1k b/t/in/1k new file mode 100644 index 0000000..24c24ec Binary files /dev/null and b/t/in/1k differ diff --git a/t/in/4 b/t/in/4 new file mode 100644 index 0000000..257cc56 --- /dev/null +++ b/t/in/4 @@ -0,0 +1 @@ +foo diff --git a/t/in/4096k b/t/in/4096k new file mode 100644 index 0000000..59740d4 Binary files /dev/null and b/t/in/4096k differ -- cgit v1.2.3