Skip to content

Commit 339efe6

Browse files
committed
WIP
1 parent 0a6f1ba commit 339efe6

1 file changed

Lines changed: 14 additions & 12 deletions

File tree

t/01_run.t

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,9 @@ subtest 'process is_running()' => sub {
130130
};
131131

132132
subtest 'process execute()' => sub {
133+
my $out = qx{bash --version};
134+
diag "=== bash: $out";
135+
133136
my $test_script = check_bin("$FindBin::Bin/data/process_check.sh");
134137
my $test_script_sigtrap = check_bin("$FindBin::Bin/data/term_trap.sh");
135138
my $p = Mojo::IOLoop::ReadWriteProcess->new(
@@ -139,8 +142,10 @@ subtest 'process execute()' => sub {
139142
is $p->getline, "TEST normal print\n", 'Get right output from stdout';
140143
is $p->err_getline, "TEST error print\n", 'Get right output from stderr';
141144
is $p->is_running, 1, 'process is still waiting for our input';
142-
$p->write("FOOBAR");
143-
is $p->read, "you entered FOOBAR\n",
145+
146+
diag "##################### 1";
147+
$p->write("FOOBAR1");
148+
is $p->read, "you entered FOOBAR1\n",
144149
'process received input and printed it back';
145150
$p->stop();
146151
is $p->is_running, 0, 'process is not running anymore';
@@ -158,14 +163,9 @@ subtest 'process execute()' => sub {
158163
is $p->is_running, 1, 'process is still waiting for our input';
159164

160165

161-
my $out = qx{bash --version};
162-
diag "=== bash: $out";
163-
164-
diag "##################### $p";
165-
my @i = @Mojo::IOLoop::ReadWriteProcess::ISA;
166-
diag "### @i";
167-
$p->write("FOOBAR1");
168-
is $p->getline, "you entered FOOBAR1\n",
166+
diag "##################### 2";
167+
$p->write("FOOBAR2");
168+
is $p->getline, "you entered FOOBAR2\n",
169169
'process received input and printed it back';
170170
$p->wait_stop();
171171
is $p->is_running, 0, 'process is not running anymore';
@@ -179,8 +179,10 @@ subtest 'process execute()' => sub {
179179
is $p->stdout, "TEST normal print\n", 'Get right output from stdout';
180180
is $p->err_getline, "TEST error print\n", 'Get right output from stderr';
181181
is $p->is_running, 1, 'process is still waiting for our input';
182-
$p->write("FOOBAR2");
183-
is $p->getline, "you entered FOOBAR2\n",
182+
183+
diag "##################### 3";
184+
$p->write("FOOBAR3");
185+
is $p->getline, "you entered FOOBAR3\n",
184186
'process received input and printed it back';
185187
$p->wait_stop();
186188
is $p->is_running, 0, 'process is not running anymore';

0 commit comments

Comments
 (0)