Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[Process] Dont test TTY if there is no TTY support#38950

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
nicolas-grekas merged 1 commit intosymfony:4.4fromNyholm:tty
Nov 2, 2020
Merged
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
[Process] Dont test TTY if there is no TTY support
  • Loading branch information
@Nyholm@nicolas-grekas
Nyholm authored andnicolas-grekas committedNov 2, 2020
commite918e5ab30c69475127e47546d2210296edfd227
19 changes: 9 additions & 10 deletionssrc/Symfony/Component/Process/Tests/ProcessTest.php
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -476,6 +476,10 @@ public function testTTYCommand()
$this->markTestSkipped('Windows does not have /dev/tty support');
}

if (!Process::isTtySupported()) {
$this->markTestSkipped('There is no TTY support');
}

$process = $this->getProcess('echo "foo" >> /dev/null && '.$this->getProcessForCode('usleep(100000);')->getCommandLine());
$process->setTty(true);
$process->start();
Expand All@@ -491,6 +495,10 @@ public function testTTYCommandExitCode()
$this->markTestSkipped('Windows does have /dev/tty support');
}

if (!Process::isTtySupported()) {
$this->markTestSkipped('There is no TTY support');
}

$process = $this->getProcess('echo "foo" >> /dev/null');
$process->setTty(true);
$process->run();
Expand DownExpand Up@@ -1433,16 +1441,7 @@ public function testRawCommandLine()
$p = Process::fromShellCommandline(sprintf('"%s" -r %s "a" "" "b"', self::$phpBin, escapeshellarg('print_r($argv);')));
$p->run();

$expected = <<<EOTXT
Array
(
[0] => -
[1] => a
[2] =>
[3] => b
)

EOTXT;
$expected = "Array\n(\n [0] => -\n [1] => a\n [2] => \n [3] => b\n)\n";
$this->assertSame($expected, str_replace('Standard input code', '-', $p->getOutput()));
}

Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp