File: save-while-in-taint-mode.t

package info (click to toggle)
libxml-rss-perl 1.49-1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 768 kB
  • sloc: perl: 6,894; xml: 378; makefile: 8
file content (30 lines) | stat: -rw-r--r-- 538 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!perl -T

use strict;
use warnings;

use Test::More tests => 1;

use XML::RSS;

{
    my $rss = XML::RSS->new();
    $rss->parsefile(
        File::Spec->catfile(
            File::Spec->curdir(), "t", "data", "2.0", "sf-hs-with-pubDate.rss"
        )
    );
    
    my $target_fn = 
        File::Spec->catfile(
            File::Spec->curdir(), "t", "data", "2.0", "sf-hs-temp.rss"
        )
        ;

    $rss->save($target_fn);

    # TEST
    ok(scalar(-e $target_fn), "Test that save was successful");

    unlink($target_fn);
}