xref: /third_party/node/test/sequential/test-process-title.js
  • Home
  • History
  • Annotate Annotate
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
  • only in /third_party/node/test/sequential/
11cb0ef41Sopenharmony_ci'use strict';
21cb0ef41Sopenharmony_ciconst common = require('../common');
31cb0ef41Sopenharmony_ciconst { spawnSync } = require('child_process');
41cb0ef41Sopenharmony_ciconst { strictEqual } = require('assert');
51cb0ef41Sopenharmony_ci
61cb0ef41Sopenharmony_ci// FIXME add sunos support
71cb0ef41Sopenharmony_ciif (common.isSunOS)
81cb0ef41Sopenharmony_ci  common.skip(`Unsupported platform [${process.platform}]`);
91cb0ef41Sopenharmony_ci// FIXME add IBMi support
101cb0ef41Sopenharmony_ciif (common.isIBMi)
111cb0ef41Sopenharmony_ci  common.skip('Unsupported platform IBMi');
121cb0ef41Sopenharmony_ci
131cb0ef41Sopenharmony_ci// Explicitly assigning to process.title before starting the child process
141cb0ef41Sopenharmony_ci// is necessary otherwise *its* process.title is whatever the last
151cb0ef41Sopenharmony_ci// SetConsoleTitle() call in our process tree set it to.
161cb0ef41Sopenharmony_ci// Can be removed when https://github.com/libuv/libuv/issues/2667 is fixed.
171cb0ef41Sopenharmony_ciif (common.isWindows)
181cb0ef41Sopenharmony_ci  process.title = process.execPath;
191cb0ef41Sopenharmony_ci
201cb0ef41Sopenharmony_ciconst xs = 'x'.repeat(1024);
211cb0ef41Sopenharmony_ciconst proc = spawnSync(process.execPath, ['-p', 'process.title', xs]);
221cb0ef41Sopenharmony_cistrictEqual(proc.stdout.toString().trim(), process.execPath);
23

Indexes created Thu Nov 07 10:32:03 CST 2024