From 70bc0eb72b01249b4c1ccc92b51bf5c442b3edc9 Mon Sep 17 00:00:00 2001 From: Luca Casonato Date: Wed, 28 Sep 2022 15:03:56 +0200 Subject: feat(unstable): Deno.setRaw -> Deno.stdin.setRaw (#15797) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Bartek IwaƄczuk --- cli/tests/integration/run_tests.rs | 2 +- cli/tests/testdata/run/unstable_worker.ts.out | 2 +- cli/tests/testdata/workers/worker_unstable.ts | 2 +- cli/tests/unit/tty_color_test.ts | 2 +- cli/tests/unit/tty_test.ts | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) (limited to 'cli/tests') diff --git a/cli/tests/integration/run_tests.rs b/cli/tests/integration/run_tests.rs index 3cafc79c6..e9285c603 100644 --- a/cli/tests/integration/run_tests.rs +++ b/cli/tests/integration/run_tests.rs @@ -3303,7 +3303,7 @@ fn set_raw_should_not_panic_on_no_tty() { let output = util::deno_cmd() .arg("eval") .arg("--unstable") - .arg("Deno.setRaw(Deno.stdin.rid, true)") + .arg("Deno.stdin.setRaw(true)") // stdin set to piped so it certainly does not refer to TTY .stdin(std::process::Stdio::piped()) // stderr is piped so we can capture output. diff --git a/cli/tests/testdata/run/unstable_worker.ts.out b/cli/tests/testdata/run/unstable_worker.ts.out index b40bdfeb8..182dc58a4 100644 --- a/cli/tests/testdata/run/unstable_worker.ts.out +++ b/cli/tests/testdata/run/unstable_worker.ts.out @@ -1,2 +1,2 @@ [Function: query] -[Function: setRaw] +[Function: consoleSize] diff --git a/cli/tests/testdata/workers/worker_unstable.ts b/cli/tests/testdata/workers/worker_unstable.ts index 5d14e228b..219f34e7b 100644 --- a/cli/tests/testdata/workers/worker_unstable.ts +++ b/cli/tests/testdata/workers/worker_unstable.ts @@ -1,5 +1,5 @@ console.log(Deno.permissions.query); -console.log(Deno.setRaw); +console.log(Deno.consoleSize); self.onmessage = () => { self.close(); }; diff --git a/cli/tests/unit/tty_color_test.ts b/cli/tests/unit/tty_color_test.ts index feb4dd470..7662d039b 100644 --- a/cli/tests/unit/tty_color_test.ts +++ b/cli/tests/unit/tty_color_test.ts @@ -1,7 +1,7 @@ // Copyright 2018-2022 the Deno authors. All rights reserved. MIT license. import { assertEquals } from "./test_util.ts"; -// Note tests for Deno.setRaw is in integration tests. +// Note tests for Deno.stdin.setRaw is in integration tests. Deno.test( { permissions: { run: true, read: true } }, diff --git a/cli/tests/unit/tty_test.ts b/cli/tests/unit/tty_test.ts index e50443aab..8787db3e1 100644 --- a/cli/tests/unit/tty_test.ts +++ b/cli/tests/unit/tty_test.ts @@ -1,7 +1,7 @@ // Copyright 2018-2022 the Deno authors. All rights reserved. MIT license. import { assert, assertThrows } from "./test_util.ts"; -// Note tests for Deno.setRaw is in integration tests. +// Note tests for Deno.stdin.setRaw is in integration tests. Deno.test({ permissions: { read: true } }, function consoleSizeFile() { const file = Deno.openSync("cli/tests/testdata/assets/hello.txt"); -- cgit v1.2.3