Skip to content

Commit

Permalink
Add test case for space in option value
Browse files Browse the repository at this point in the history
  • Loading branch information
gemmaro committed Jan 5, 2024
1 parent b3f8e67 commit da7359a
Show file tree
Hide file tree
Showing 6 changed files with 79 additions and 0 deletions.
23 changes: 23 additions & 0 deletions t/cfg-option.t
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#! /usr/bin/perl
# config file tester.

#########################

use strict;
use warnings;

use lib q(t);
use Testhelper;

my @tests;
push @tests,
{
'doc' => 'space in option value',
'po4a.conf' => 'cfg/space-in-option-value/po4a.conf',
'modes' => 'dstdir',
'expected_files' => 'man.pot man.ja.po'
};

run_all_tests(@tests);

0;
3 changes: 3 additions & 0 deletions t/cfg/space-in-option-value/_output
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Updating man.pot: (1 entries)
Updating man.ja.po: 1 translated message.
man.ja.1 is 100% translated (1 strings).
1 change: 1 addition & 0 deletions t/cfg/space-in-option-value/man.1
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.TH test 1
23 changes: 23 additions & 0 deletions t/cfg/space-in-option-value/man.ja.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Japanese translations for Hello world package
# Copyright (C) 2024 Goodbye Mars
# This file is distributed under the same license as the Hello world package.
# Automatically generated, 2024.
#
msgid ""
msgstr ""
"Project-Id-Version: Hello VERSION\n"
"POT-Creation-Date: 2024-01-05 08:52+0900\n"
"PO-Revision-Date: 2024-01-05 08:54+0900\n"
"Last-Translator: Automatically generated\n"
"Language-Team: none\n"
"Language: ja\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=1; plural=0;\n"

#. type: TH
#: man.1:1
#, no-wrap
msgid "test"
msgstr "検査"
23 changes: 23 additions & 0 deletions t/cfg/space-in-option-value/man.pot
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# SOME DESCRIPTIVE TITLE
# Copyright (C) YEAR Goodbye Mars
# This file is distributed under the same license as the Hello world package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: Hello VERSION\n"
"POT-Creation-Date: 2024-01-05 08:52+0900\n"
"PO-Revision-Date: 2024-01-05 08:54+0900\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <[email protected]>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"

#. type: TH
#: man.1:1
#, no-wrap
msgid "test"
msgstr ""
6 changes: 6 additions & 0 deletions t/cfg/space-in-option-value/po4a.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[options] --package-name "Hello world" \
--copyright-holder "Goodbye Mars"

[po4a_langs] ja
[po4a_paths] man.pot ja:man.ja.po
[type:man] man.1 ja:man.ja.1

0 comments on commit da7359a

Please sign in to comment.