forked from facebook/hermes
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconsole-log.js
More file actions
33 lines (26 loc) · 956 Bytes
/
console-log.js
File metadata and controls
33 lines (26 loc) · 956 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @format
*/
// RUN: %node-hermes %s | %FileCheck --match-full-lines %s
// REQUIRES: node-hermes
print('Console log functionality');
// CHECK-LABEL: Console log functionality
console.log('hello %s %d', 'world', 123);
// CHECK: hello world 123
console.log('hello %s %d', 'world again ', 123);
// CHECK-NEXT: hello world again 123
console.log("hello %s %d", 'world', 123);
// CHECK-NEXT: hello world 123
var {Console} = require('console');
var console1 = Console({stdout: process.stdout, stderr: process.stderr});
console1.log('hello %s %d', 'world', 123);
// CHECK-NEXT: hello world 123
var {Console} = console;
var console2 = Console({stdout: process.stdout, stderr: process.stderr});
console2.log('hello %s %d', 'world', 123);
// CHECK-NEXT: hello world 123