diff _test/Test/Lang.pm @ 176:74c27daf2e7b

minor changes
author sergey
date Wed, 05 Oct 2011 16:23:45 +0400
parents 9057e4b95d10
children b3d91ff7aea9
line wrap: on
line diff
--- a/_test/Test/Lang.pm	Wed Oct 05 00:48:43 2011 +0300
+++ b/_test/Test/Lang.pm	Wed Oct 05 16:23:45 2011 +0400
@@ -93,4 +93,17 @@
 	
 };
 
+test hashParse => sub {	
+	my $res = hashParse("a = test a\nb = test b\nc c=test c");
+	
+	assert($res->{a} eq "test a");
+	assert($res->{b} eq "test b");
+	assert($res->{"c c"} eq "test c");
+	
+	$res = hashParse("a:b, c: d",qr/\s*:\s*/,qr/\s*,\s*/);
+	
+	assert($res->{a} eq "b");
+	assert($res->{c} eq "d");
+};
+
 1;
\ No newline at end of file