File tree Expand file tree Collapse file tree 14 files changed +233
-7
lines changed
Expand file tree Collapse file tree 14 files changed +233
-7
lines changed Original file line number Diff line number Diff line change 22/vendor /
33/bin /sca /phpcs.txt
44/bin /sca /phpmd.html
5+ composer.lock
Original file line number Diff line number Diff line change 11language : php
2+
23php :
34 - ' 5.6'
45 - ' 7.0'
56 - hhvm
67 - nightly
8+
79install : composer install
10+
11+ matrix :
12+ allow_failures :
13+ - php : hhvm
14+
815script :
916 - ./vendor/bin/phpcs --standard=phpcs.xml src/
1017 - ./vendor/bin/phpmd src/ text phpmd.xml
18+ - ./bin/runtests.sh
Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+
3+ BASEDIR=$( dirname $0 )
4+
5+ php BASEDIR/../tests/TestRig.php
Original file line number Diff line number Diff line change 1212 ],
1313 "require-dev" : {
1414 "ve-interactive/php-sniffer-rules" : " dev-master" ,
15- "ve-interactive/php-mess-detector" : " *"
15+ "ve-interactive/php-mess-detector" : " *" ,
16+ "phpdocumentor/reflection-docblock" : " 2.0.4"
1617 },
1718 "require" : {
1819 "php" : " >=5.6.0"
Original file line number Diff line number Diff line change 1+ <?php
2+ /**
3+ * @title Basic example to show grepping.
4+ * @command ChattyYes | grep 'Yes\|Chatty' | head
5+ * @expected Yes\nChatty\nYes\nChatty\nYes\nChatty\nYes\nChatty\nYes\nChatty\n
6+ */
7+
8+ error_reporting (E_ALL );
9+
10+ include __DIR__ . '/../vendor/autoload.php ' ;
11+
12+ use ElvenSpellmaker \PipeSys as PS ;
13+ use ElvenSpellmaker \PipeSys \Command as Command ;
14+
15+ $ c = new PS \Scheduler (new Command \StandardConnector );
16+ $ c ->addCommand (new Command \ChattyYes );
17+ $ c ->addCommand (new Command \Grep ('Yes|Chatty ' ));
18+ $ c ->addCommand (new Command \Head );
19+ $ c ->run ();
Original file line number Diff line number Diff line change 1+ <?php
2+ /**
3+ * @title Example to show large head into smaller head.
4+ * @command ChattyYes | head -n 200 | head -n 7
5+ * @expected Yes\nI\nAm\nChatty\nYes\nI\nAm\n
6+ */
7+
8+ error_reporting (E_ALL );
9+
10+ include __DIR__ . '/../vendor/autoload.php ' ;
11+
12+ use ElvenSpellmaker \PipeSys as PS ;
13+ use ElvenSpellmaker \PipeSys \Command as Command ;
14+
15+ $ c = new PS \Scheduler (new Command \StandardConnector );
16+ $ c ->addCommand (new Command \ChattyYes );
17+ $ c ->addCommand (new Command \Head (200 ));
18+ $ c ->addCommand (new Command \Head (7 ));
19+ $ c ->run ();
Original file line number Diff line number Diff line change 1+ <?php
2+ /**
3+ * @title Example to show small head into larger head.
4+ * @command ChattyYes | head -n 5 | head
5+ * @expected Yes\nI\nAm\nChatty\nYes\n
6+ */
7+
8+ error_reporting (E_ALL );
9+
10+ include __DIR__ . '/../vendor/autoload.php ' ;
11+
12+ use ElvenSpellmaker \PipeSys as PS ;
13+ use ElvenSpellmaker \PipeSys \Command as Command ;
14+
15+ $ c = new PS \Scheduler (new Command \StandardConnector );
16+ $ c ->addCommand (new Command \ChattyYes );
17+ $ c ->addCommand (new Command \Head (5 ));
18+ $ c ->addCommand (new Command \Head (10 ));
19+ $ c ->run ();
Original file line number Diff line number Diff line change 1+ <?php
2+ /**
3+ * @title Basic example to show that `head` terminates `yes`.
4+ * @command yes | head
5+ * @expected y\ny\ny\ny\ny\ny\ny\ny\ny\ny\n
6+ */
7+
8+ error_reporting (E_ALL );
9+
10+ include __DIR__ . '/../vendor/autoload.php ' ;
11+
12+ use ElvenSpellmaker \PipeSys as PS ;
13+ use ElvenSpellmaker \PipeSys \Command as Command ;
14+
15+ $ c = new PS \Scheduler (new Command \StandardConnector );
16+ $ c ->addCommand (new Command \Yes );
17+ $ c ->addCommand (new Command \Head );
18+ $ c ->run ();
Original file line number Diff line number Diff line change 1+ <?php
2+ /**
3+ * @title Tests two infinite commands and a terminating command.
4+ * @command yes | yes | head
5+ * @expected y\ny\ny\ny\ny\ny\ny\ny\ny\ny\n
6+ */
7+
8+ error_reporting (E_ALL );
9+
10+ include __DIR__ . '/../vendor/autoload.php ' ;
11+
12+ use ElvenSpellmaker \PipeSys as PS ;
13+ use ElvenSpellmaker \PipeSys \Command as Command ;
14+
15+ $ c = new PS \Scheduler (new Command \StandardConnector );
16+ $ c ->addCommand (new Command \Yes );
17+ $ c ->addCommand (new Command \Yes );
18+ $ c ->addCommand (new Command \Head );
19+ $ c ->run ();
Original file line number Diff line number Diff line change @@ -21,10 +21,10 @@ class ChattyYes extends AbstractCommand
2121 public function __construct ()
2222 {
2323 $ this ->chatting = [
24- ' Yes ' . PHP_EOL ,
25- ' I ' . PHP_EOL ,
26- ' Am ' . PHP_EOL ,
27- ' Chatty ' . PHP_EOL ,
24+ " Yes \n" ,
25+ " I \n" ,
26+ " Am \n" ,
27+ " Chatty \n" ,
2828 ];
2929 }
3030
You can’t perform that action at this time.
0 commit comments