Security update for Core, with self-updated composer
[yaffs-website] / node_modules / grunt-legacy-util / test / fixtures / spawn-multibyte.js
1 // This is a test fixture for a case where spawn receives incomplete
2 // multibyte strings in separate data events.
3
4 // A multibyte buffer containing all our output. We will slice it later.
5 // In this case we are using a Japanese word for hello / good day, where each
6 // character takes three bytes.
7 var fullOutput = new Buffer('こんにちは');
8
9 // Output one full character and one third of a character
10 process.stdout.write(fullOutput.slice(0, 4));
11
12 // Output the rest of the string
13 process.stdout.write(fullOutput.slice(4));
14
15 // Do the same for stderr
16 process.stderr.write(fullOutput.slice(0, 4));
17 process.stderr.write(fullOutput.slice(4));