File: testGettext.js

package info (click to toggle)
cjs 128.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 5,872 kB
  • sloc: cpp: 34,377; javascript: 27,762; ansic: 13,033; sh: 1,611; python: 780; xml: 116; makefile: 38
file content (16 lines) | stat: -rw-r--r-- 673 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// -*- mode: js; indent-tabs-mode: nil -*-
// SPDX-License-Identifier: MIT OR LGPL-2.0-or-later
// SPDX-FileCopyrightText: 2015 Endless Mobile, Inc.

const Gettext = imports.gettext;

describe('Gettext module', function () {
    // We don't actually want to mess with the locale, so just use setlocale's
    // query mode. We also don't want to make this test locale-dependent, so
    // just assert that it returns a string with at least length 1 (the shortest
    // locale is "C".)
    it('setlocale returns a locale', function () {
        let locale = Gettext.setlocale(Gettext.LocaleCategory.ALL, null);
        expect(locale.length).not.toBeLessThan(1);
    });
});