po.t: fix expected results
As index.{es,fr} don't exist, po::refreshpofiles copies them from the basewiki underlay before running msgmerge. msgmerge marks as obsolete the translation strings that came from the basewiki po files, but the link plugin does not make the difference between obsolete and up-to-date links. $links{'index.fr'} and $links{'index.es'} are therefore expected to contain SandBox and ikiwiki.master
parent
c66fae8b16
commit
d98296d1db
8
t/po.t
8
t/po.t
|
@ -118,8 +118,8 @@ $config{po_link_to}='negotiated';
|
|||
$msgprefix="links (po_link_to=negotiated)";
|
||||
refresh_n_scan('index.mdwn', 'translatable.mdwn', 'nontranslatable.mdwn');
|
||||
is_deeply(\@{$links{'index'}}, ['translatable', 'nontranslatable'], "$msgprefix index");
|
||||
is_deeply(\@{$links{'index.es'}}, ['translatable.es', 'nontranslatable'], "$msgprefix index.es");
|
||||
is_deeply(\@{$links{'index.fr'}}, ['translatable.fr', 'nontranslatable'], "$msgprefix index.fr");
|
||||
is_deeply(\@{$links{'index.es'}}, ['translatable.es', 'nontranslatable', 'SandBox', 'ikiwiki'], "$msgprefix index.es");
|
||||
is_deeply(\@{$links{'index.fr'}}, ['translatable.fr', 'nontranslatable', 'SandBox', 'ikiwiki'], "$msgprefix index.fr");
|
||||
is_deeply(\@{$links{'translatable'}}, ['nontranslatable'], "$msgprefix translatable");
|
||||
is_deeply(\@{$links{'translatable.es'}}, ['nontranslatable'], "$msgprefix translatable.es");
|
||||
is_deeply(\@{$links{'translatable.fr'}}, ['nontranslatable'], "$msgprefix translatable.fr");
|
||||
|
@ -129,8 +129,8 @@ $config{po_link_to}='current';
|
|||
$msgprefix="links (po_link_to=current)";
|
||||
refresh_n_scan('index.mdwn', 'translatable.mdwn', 'nontranslatable.mdwn');
|
||||
is_deeply(\@{$links{'index'}}, ['translatable', 'nontranslatable'], "$msgprefix index");
|
||||
is_deeply(\@{$links{'index.es'}}, [ map bestlink('index.es', $_), ('translatable.es', 'nontranslatable')], "$msgprefix index.es");
|
||||
is_deeply(\@{$links{'index.fr'}}, [ map bestlink('index.fr', $_), ('translatable.fr', 'nontranslatable')], "$msgprefix index.fr");
|
||||
is_deeply(\@{$links{'index.es'}}, [ (map bestlink('index.es', $_), ('translatable.es', 'nontranslatable')), 'SandBox', 'ikiwiki'], "$msgprefix index.es");
|
||||
is_deeply(\@{$links{'index.fr'}}, [ (map bestlink('index.fr', $_), ('translatable.fr', 'nontranslatable')), 'SandBox', 'ikiwiki'], "$msgprefix index.fr");
|
||||
is_deeply(\@{$links{'translatable'}}, [bestlink('translatable', 'nontranslatable')], "$msgprefix translatable");
|
||||
is_deeply(\@{$links{'translatable.es'}}, ['nontranslatable'], "$msgprefix translatable.es");
|
||||
is_deeply(\@{$links{'translatable.fr'}}, ['nontranslatable'], "$msgprefix translatable.fr");
|
||||
|
|
Loading…
Reference in New Issue