run_002.phpt 863 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. --TEST--
  2. Stdin and escaped args being passed to run command
  3. --CLEAN--
  4. <?php
  5. @unlink("run_002_tmp.fixture");
  6. ?>
  7. --PHPDBG--
  8. ev file_put_contents("run_002_tmp.fixture", "stdin\ndata")
  9. b 6
  10. r <run_002_tmp.fixture
  11. r arg1 '_ \' arg2 "' < run_002_tmp.fixture
  12. y
  13. c
  14. q
  15. --EXPECTF--
  16. [Successful compilation of %s]
  17. prompt> 10
  18. prompt> [Breakpoint #0 added at %s:6]
  19. prompt> array(1) {
  20. [0]=>
  21. string(%d) "%s"
  22. }
  23. string(10) "stdin
  24. data"
  25. [Breakpoint #0 at %s:6, hits: 1]
  26. >00006: echo "ok\n";
  27. 00007:
  28. prompt> Do you really want to restart execution? (type y or n): array(3) {
  29. [0]=>
  30. string(%d) "%s"
  31. [1]=>
  32. string(4) "arg1"
  33. [2]=>
  34. string(10) "_ ' arg2 ""
  35. }
  36. string(10) "stdin
  37. data"
  38. [Breakpoint #0 at %s:6, hits: 1]
  39. >00006: echo "ok\n";
  40. 00007:
  41. prompt> ok
  42. [Script ended normally]
  43. prompt>
  44. --FILE--
  45. <?php
  46. var_dump($argv);
  47. var_dump(stream_get_contents(STDIN));
  48. echo "ok\n";