mirror of
https://github.com/jjbrunton/Sauci.git
synced 2026-10-31 18:19:43 +00:00
test(dev-local): cover native locale forwarding
This commit is contained in:
1 parent
15c7894bec
commit
e417f7f79a
1 file changed
+13
@@ -0,0 +1,13 @@
|
||||
import assert from 'node:assert/strict';
|
||||
import { readFile } from 'node:fs/promises';
|
||||
import test from 'node:test';
|
||||
import { fileURLToPath } from 'node:url';
|
||||
|
||||
const launcherPath = fileURLToPath(new URL('./dev-local.sh', import.meta.url));
|
||||
|
||||
test('native launcher retains a UTF-8 locale after sanitizing its environment', async () => {
|
||||
const launcher = await readFile(launcherPath, 'utf8');
|
||||
const nativeCommand = launcher.slice(launcher.indexOf('cmd_native() {'), launcher.indexOf('\ncase "${1:-up}" in'));
|
||||
|
||||
assert.match(nativeCommand, /env -i[\s\S]*LANG=en_US\.UTF-8 LC_ALL=en_US\.UTF-8/);
|
||||
});
|
||||
Reference in new issue
Block a user