MediaWiki REL1_31
wfShellExecTest.php
Go to the documentation of this file.
1<?php
2
8 public function testBug67870() {
10 // 333 = 331 + CRLF
11 ? ( 'for /l %i in (1, 1, 1001) do @echo ' . str_repeat( '*', 331 ) )
12 : 'printf "%-333333s" "*"';
13
14 // Test several times because it involves a race condition that may randomly succeed or fail
15 for ( $i = 0; $i < 10; $i++ ) {
17 $this->assertEquals( 333333, strlen( $output ) );
18 }
19 }
20}
wfShellExec( $cmd, &$retval=null, $environ=[], $limits=[], $options=[])
Execute a shell command, with time and memory limits mirrored from the PHP configuration if supported...
wfIsWindows()
Check if the operating system is Windows.
$command
Definition cdb.php:65
GlobalFunctions wfShellExec.
static configuration should be added through ResourceLoaderGetConfigVars instead can be used to get the real title after the basic globals have been set but before ordinary actions take place $output
Definition hooks.txt:2255