blob: e333789baa2a532f90e93de2e21f6ef3b84a68d4 [file] [log] [blame]
// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
// @dart = 2.9
/// int terminalColumns
/// If no terminal is attached to stdout, a StdoutException is thrown.
/// @description Checks that exception is thrown if there is no attached
/// terminal.
/// @author iarkh@unipro.ru
import "dart:io";
import "../../../Utils/expect.dart";
main() {
if (!stderr.hasTerminal) {
Expect.throws(() => stderr.terminalColumns, (e) => e is StdoutException);
}
if (!stdout.hasTerminal) {
Expect.throws(() => stdout.terminalColumns, (e) => e is StdoutException);
}
}