repo.or.cz
/
blog.pm-common-perl-mods.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Typos fix and perltidy.
[blog.pm-common-perl-mods.git]
/
Rose-DBx-Object-I18N
/
t
/
load-i18n.t
blob
7ae65e299e3fab32d598fae6354cb6b1de8a25a5
1
#! /usr/bin/perl
2
3
use
strict
;
4
use
warnings
;
5
6
use
Test
::
More
'tests'
=>
9
;
7
8
use
lib
't/lib'
;
9
10
use
NewDB
;
11
use
User
;
12
use
User
::
Manager
;
13
14
my
$db
=
NewDB
->
new
();
15
16
$db
->
init
();
17
18
my
$u
=
User
->
new
(
19
name
=>
'foobar'
,
20
orig_lang
=>
'en'
,
21
signature
=>
'hello'
22
);
23
$u
->
save
();
24
my
$id
=
$u
->
id
;
25
26
foreach
my
$lang
(
@
{
$u
->
i18n_languages
} ) {
27
$u
->
i18n
(
$lang
);
28
ok
(
$u
->
i18n
);
29
30
is
(
$u
->
i18n
->
lang
,
$lang
, );
31
32
is
(
$u
->
i18n
->
signature
,
'hello'
, );
33
}
34
35
$u
->
delete
(
cascade
=>
1
);
36
37
1
;