| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 18a235b commit 1d79af6
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,6 +1,6 @@ | |||
| 1 | 1 | 'use strict'; | |
| 2 | 2 | ||
| 3 | - require('../common'); | ||
| 3 | + const common = require('../common'); | ||
| 4 | 4 | const assert = require('assert'); | |
| 5 | 5 | ||
| 6 | 6 | // changes in environment should be visible to child processes | |
@@ -67,3 +67,17 @@ assert.equal(3, date.getUTCHours()); | |||
| 67 | 67 | assert.equal(5, date.getHours()); | |
| 68 | 68 | */ | |
| 69 | 69 | /* eslint-enable max-len */ | |
| 70 | + | ||
| 71 | + // Environment variables should be case-insensitive on Windows, and | ||
| 72 | + // case-sensitive on other platforms. | ||
| 73 | + process.env.TEST = 'test'; | ||
| 74 | + assert.strictEqual(process.env.TEST, 'test'); | ||
| 75 | + // Check both mixed case and lower case, to avoid any regressions that might | ||
| 76 | + // simply convert input to lower case. | ||
| 77 | + if (common.isWindows) { | ||
| 78 | + assert.strictEqual(process.env.test, 'test'); | ||
| 79 | + assert.strictEqual(process.env.teST, 'test'); | ||
| 80 | + } else { | ||
| 81 | + assert.strictEqual(process.env.test, undefined); | ||
| 82 | + assert.strictEqual(process.env.teST, undefined); | ||
| 83 | + } | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments