@ymdvsymd/tornado 0.7.1 → 0.7.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/tornado.js +1 -1
- package/package.json +1 -1
- package/sdk/shebang.test.mjs +13 -0
package/bin/tornado.js
CHANGED
package/package.json
CHANGED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import test from 'node:test';
|
|
2
|
+
import assert from 'node:assert/strict';
|
|
3
|
+
import { readFileSync } from 'node:fs';
|
|
4
|
+
|
|
5
|
+
test('bin/tornado.js has valid shebang without backslash escaping', () => {
|
|
6
|
+
const buf = readFileSync('bin/tornado.js');
|
|
7
|
+
// 先頭2バイトが #! (0x23 0x21) であること
|
|
8
|
+
assert.equal(buf[0], 0x23, 'first byte should be # (0x23)');
|
|
9
|
+
assert.equal(buf[1], 0x21, 'second byte should be ! (0x21), not \\! (0x5c 0x21)');
|
|
10
|
+
// 完全な shebang 行の検証
|
|
11
|
+
const firstLine = buf.toString('utf8').split('\n')[0];
|
|
12
|
+
assert.equal(firstLine, '#!/usr/bin/env node');
|
|
13
|
+
});
|