File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -22,27 +22,27 @@ load test_helper
2222 local remote_file=" $TEST_DIR /phpvm-latest.sh"
2323 cat > " $remote_file " << 'EOF '
2424#!/bin/bash
25- PHPVM_VERSION="1.12.1 "
25+ PHPVM_VERSION="1.12.2 "
2626EOF
2727
2828 run env PHPVM_TEST_MODE=true PHPVM_SELF_UPDATE_TEST_SOURCE=" $remote_file " PHPVM_SELF_UPDATE_DEST=" $TEST_DIR /phpvm-self-update-target.sh" bash " $BATS_TEST_DIRNAME /../phpvm.sh" self-update
2929 [ " $status " -eq 0 ]
30- [[ " $output " =~ " You are already on the latest version: v1.12.1 ." ]]
30+ [[ " $output " =~ " You are already on the latest version: v1.12.2 ." ]]
3131}
3232
3333@test " phpvm self-update replaces script when newer version is available" {
3434 local remote_file=" $TEST_DIR /phpvm-updated.sh"
3535 local target_file=" $TEST_DIR /phpvm-self-update-target.sh"
3636 cat > " $remote_file " << 'EOF '
3737#!/bin/bash
38- PHPVM_VERSION="1.12.2 "
38+ PHPVM_VERSION="1.12.3 "
3939EOF
4040 touch " $target_file "
4141
4242 run env PHPVM_TEST_MODE=true PHPVM_SELF_UPDATE_TEST_SOURCE=" $remote_file " PHPVM_SELF_UPDATE_DEST=" $target_file " bash " $BATS_TEST_DIRNAME /../phpvm.sh" self-update
4343 [ " $status " -eq 0 ]
44- [[ " $output " =~ " phpvm successfully updated to the latest version: v1.12.2 ." ]]
45- [ " $( grep -oE ' PHPVM_VERSION="[0-9]+\.[0-9]+\.[0-9]+"' " $target_file " ) " = " PHPVM_VERSION=\" 1.12.2 \" " ]
44+ [[ " $output " =~ " phpvm successfully updated to the latest version: v1.12.3 ." ]]
45+ [ " $( grep -oE ' PHPVM_VERSION="[0-9]+\.[0-9]+\.[0-9]+"' " $target_file " ) " = " PHPVM_VERSION=\" 1.12.3 \" " ]
4646}
4747
4848@test " phpvm self-update downloads from remote URL and updates script" {
You can’t perform that action at this time.
0 commit comments