~ubuntu-branches/ubuntu/trusty/libversion-perl/trusty

« back to all changes in this revision

Viewing changes to t/07locale.t

  • Committer: Package Import Robot
  • Author(s): Colin Watson
  • Date: 2014-01-09 14:44:58 UTC
  • mfrom: (7.1.15 sid)
  • Revision ID: package-import@ubuntu.com-20140109144458-35u0eijdn1ed62w0
Tags: 1:0.9906-1ubuntu1
* Resynchronise with Debian.  Remaining changes:
  - debian/control: Build-depend on locales rather than locales-all.

Show diffs side-by-side

added added

removed removed

Lines of Context:
11
11
use Config;
12
12
 
13
13
BEGIN {
14
 
    use_ok('version', 0.9904);
 
14
    use_ok('version', 0.9906);
15
15
}
16
16
 
17
17
SKIP: {
22
22
        # test locale handling
23
23
        my $warning;
24
24
 
25
 
        use locale;
26
 
 
27
25
        local $SIG{__WARN__} = sub { $warning = $_[0] };
28
26
 
29
27
        my $ver = 1.23;  # has to be floating point number
33
31
                                                      # because have to
34
32
                                                      # evaluate in current
35
33
                                                      # scope
 
34
        use locale;
 
35
 
36
36
        while (<DATA>) {
37
37
            chomp;
38
38
            $loc = setlocale( LC_ALL, $_);
39
 
            last if localeconv()->{decimal_point} eq ',';
 
39
            last if $loc && localeconv()->{decimal_point} eq ',';
40
40
        }
41
41
        skip 'Cannot test locale handling without a comma locale', 5
42
42
            unless $loc and localeconv()->{decimal_point} eq ',';