Sha256: b106eafcce7467d0a852844f108f14927fac0360c7a90ee430d869960fe39fc7

Contents?: true

Size: 307 Bytes

Versions: 2

Compression:

Stored size: 307 Bytes

Contents

# frozen_string_literal: true

require_relative '../lib/tty-command'

cmd = TTY::Command.new

path = File.expand_path("../spec/fixtures/infinite_input", __dir__)

range = 1..Float::INFINITY
infinite_input = range.lazy.map { |x| x }.first(10_000).join("\n")

cmd.run(path, input: infinite_input, timeout: 2)

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
tty-command-0.9.0 examples/timeout_input.rb
tty-command-0.8.2 examples/timeout_input.rb