use Test::More tests => 1; use My::Module qw/get_a_filename/; # gives a path with backslashes my $expected = "some/file/path/here"; is( get_a_filename(), $expected ); #### use Test::FilePath tests => 1; filepath_is( "some/path", "some\path" ); #### my @expected = qw{ some file path here }; is( get_a_filename(), File::Spec->join( @expected ) ); #### my $expected = "some/file/path/here"; filepath_is( "some:file:path:here", $expected );