From 5a3bc196eb38194f9ffc2b652403b2a772c83991 Mon Sep 17 00:00:00 2001 From: Alex 'AdUser' Z Date: Fri, 26 Dec 2014 17:11:10 +1000 Subject: [PATCH] + t/basic.t --- t/basic.t | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100755 t/basic.t diff --git a/t/basic.t b/t/basic.t new file mode 100755 index 0000000..6375bad --- /dev/null +++ b/t/basic.t @@ -0,0 +1,35 @@ +#!/usr/bin/perl + +use strict; +use warnings; +use lib 'lib'; + +use POSIX qw(tmpnam); +use Test::More tests => 3; + +require_ok('Playlist::PLS'); + +my $pls = new_ok('Playlist::PLS' => []); + +my $path = tmpnam(); +open my $FH, ">", $path; +print $FH < 'http://1.2.3.4:8000/listen.aac', + title => '(#1 - 1/1) Radio Broadcast', + length => '-1', +}]; +is_deeply(scalar $pls->load($path), $out, "Loading test playlist"); + +unlink $path; + +exit 0;