Skip to content

Commit

Permalink
final fix for e2e
Browse files Browse the repository at this point in the history
  • Loading branch information
sidz committed Nov 25, 2018
1 parent fd94b59 commit b9fdbdd
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 15 deletions.
8 changes: 3 additions & 5 deletions tests/Fixtures/e2e/Initial_Configuration/do_configure.expect
Expand Up @@ -2,18 +2,16 @@
set timeout 20
eval spawn $env(INFECTION)

proc configure {input} {
proc configure { input value } {
expect $input {
send "\r"
send $value
} timeout {
send_user "Test failed\n"
exit 1
}
}

expect "directories do you want to include"
send "2\r"

configure "directories do you want to include" "2\r"
configure "Any directories to exclude from" "\r"
configure "timeout in seconds" "\r"
configure "text log file?" "\r"
Expand Down
9 changes: 4 additions & 5 deletions tests/Fixtures/e2e/Initial_Configuration/run_tests.bash
Expand Up @@ -6,19 +6,18 @@ if test ! -f "$(which expect)"; then
exit 1;
fi

readonly INFECTION=../../../../bin/infection

cd $(dirname $0)
rm -f infection.json.dist
rm -f infection.json.dist infection.log

set -e

if [[ "$PHPDBG" = "1" ]]
then
phpdbg -qrr $INFECTION
INFECTION="phpdbg -qrr ../../../../bin/infection"
else
php $INFECTION
INFECTION="php ../../../../bin/infection"
fi
export INFECTION

./do_configure.expect

Expand Down
Expand Up @@ -8,10 +8,6 @@ class IgnoredSourceClass
{
public function doSmth()
{
$a = 10;

$a++;

return $a;
return 10;
}
}

0 comments on commit b9fdbdd

Please sign in to comment.