From 17b0002a5ab12f07e0f342556f7be5a8b7002195 Mon Sep 17 00:00:00 2001 From: Dobrica Pavlinusic Date: Sun, 14 Mar 2004 12:37:14 +0000 Subject: [PATCH] moved tests in own directory, added test to demonstrate XML::Simple feature to remove spaces from begin and end attribute value (which is wrong for delimiters as WebPAC uses them) git-svn-id: file:///home/dpavlin/private/svn/webpac/trunk@278 13eb9ef6-21d5-0310-b721-a9d68796d827 --- {tools => tests}/test_charset.pl | 0 {tools => tests}/test_isis.pl | 0 .../test_parse_format.pl | 0 tests/test_xml_simple.pl | 20 +++++++++++++++++++ 4 files changed, 20 insertions(+) rename {tools => tests}/test_charset.pl (100%) rename {tools => tests}/test_isis.pl (100%) rename test_parse_format.pl => tests/test_parse_format.pl (100%) create mode 100755 tests/test_xml_simple.pl diff --git a/tools/test_charset.pl b/tests/test_charset.pl similarity index 100% rename from tools/test_charset.pl rename to tests/test_charset.pl diff --git a/tools/test_isis.pl b/tests/test_isis.pl similarity index 100% rename from tools/test_isis.pl rename to tests/test_isis.pl diff --git a/test_parse_format.pl b/tests/test_parse_format.pl similarity index 100% rename from test_parse_format.pl rename to tests/test_parse_format.pl diff --git a/tests/test_xml_simple.pl b/tests/test_xml_simple.pl new file mode 100755 index 0000000..285b73e --- /dev/null +++ b/tests/test_xml_simple.pl @@ -0,0 +1,20 @@ +#!/usr/bin/perl -w + +use strict; +use XML::Simple; +use IO::File; +use Data::Dumper; + +my $xml = 'truæ'; + +my $xml_file = shift @ARGV; + +if ($xml_file) { + my $fh = new IO::File($xml_file) || die "can't open $xml_file: $!"; + $xml = XMLin($fh); +} else { + $xml = XMLin($xml); +} + +print Dumper($xml),"\n"; + -- 2.20.1