11cb0ef41Sopenharmony_ci'use strict';
21cb0ef41Sopenharmony_ci
31cb0ef41Sopenharmony_ciconst common = require('../common');
41cb0ef41Sopenharmony_ci
51cb0ef41Sopenharmony_ciif (!common.hasIntl) {
61cb0ef41Sopenharmony_ci  common.skip('missing Intl');
71cb0ef41Sopenharmony_ci}
81cb0ef41Sopenharmony_ci
91cb0ef41Sopenharmony_ci// Refs: https://github.com/nodejs/node/blob/1af63a90ca3a59ca05b3a12ad7dbea04008db7d9/configure.py#L1694-L1711
101cb0ef41Sopenharmony_ciif (process.config.variables.icu_path !== 'deps/icu-small') {
111cb0ef41Sopenharmony_ci  // If Node.js is configured to use its built-in ICU, it uses a strict subset
121cb0ef41Sopenharmony_ci  // of ICU formed using `tools/icu/shrink-icu-src.py`, which is present in
131cb0ef41Sopenharmony_ci  // `deps/icu-small`. It is not the same as configuring the build with
141cb0ef41Sopenharmony_ci  // `./configure --with-intl=small-icu`. The latter only uses a subset of the
151cb0ef41Sopenharmony_ci  // locales, i.e., it uses the English locale, `root,en`, by default and other
161cb0ef41Sopenharmony_ci  // locales can also be specified using the `--with-icu-locales` option.
171cb0ef41Sopenharmony_ci  common.skip('not using the icu data file present in deps/icu-small/source/data/in/icudt##l.dat.bz2');
181cb0ef41Sopenharmony_ci}
191cb0ef41Sopenharmony_ci
201cb0ef41Sopenharmony_ciconst fixtures = require('../common/fixtures');
211cb0ef41Sopenharmony_ci
221cb0ef41Sopenharmony_ci// This test ensures the correctness of the automated timezone upgrade PRs.
231cb0ef41Sopenharmony_ci
241cb0ef41Sopenharmony_ciconst { strictEqual } = require('assert');
251cb0ef41Sopenharmony_ciconst { readFileSync } = require('fs');
261cb0ef41Sopenharmony_ci
271cb0ef41Sopenharmony_ciconst expectedVersion = readFileSync(fixtures.path('tz-version.txt'), 'utf8').trim();
281cb0ef41Sopenharmony_cistrictEqual(process.versions.tz, expectedVersion);
29