From e3dbb6fabf87a132b95e1210be30c5454099ac31 Mon Sep 17 00:00:00 2001 From: Rafael Garcia-Suarez Date: Thu, 24 Jun 2004 03:13:35 +0000 Subject: Handle quoted option values --- t/cfg.t | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 't') diff --git a/t/cfg.t b/t/cfg.t index 3ea895fb..45403e24 100644 --- a/t/cfg.t +++ b/t/cfg.t @@ -18,7 +18,7 @@ update\\ 1 http://foo/bar/ { compress: 1 fuzzy: 1 keep: yes - key-ids: 123 + key-ids: "123" update verify-rpm: yes } @@ -26,8 +26,8 @@ update\\ 1 http://foo/bar/ { update_2 ftp://foo/bar/ { hdlist: hdlist.update2.cz ignore - key_ids: 456 - priority-upgrade: kernel + key_ids: 456 789 + priority-upgrade: 'kernel' synthesis with_hdlist: hdlist.update2.cz } @@ -40,9 +40,13 @@ ok( ref $config, 'config loaded' ); ok( urpm::cfg::dump_config($file.2, $config), 'config written' ); +# things that have been tidied up by dump_config $cfgtext =~ s/\byes\b/1/g; $cfgtext =~ s/\bno\b/0/g; $cfgtext =~ s/\bkey_ids\b/key-ids/g; +$cfgtext =~ s/"123"/123/g; +$cfgtext =~ s/'kernel'/kernel/g; + my $cfgtext2 = cat_($file.2); $cfgtext2 =~ s/# generated.*\n//; is( $cfgtext, $cfgtext2, 'config is the same' ) -- cgit v1.2.1