57 lines
1.8 KiB
Bash
Executable file
57 lines
1.8 KiB
Bash
Executable file
# runtest.sh - bz444425-strtotime - Bugzilla(s) 444425
|
|
# Author: Martin Koci (koca) <mkoci@redhat.com>
|
|
# Location: /CoreOS/php/Regression/bz444425-strtotime/runtest.sh
|
|
|
|
# Description: PHP bug 37514 strtotime to parse dates with out specifying a year
|
|
|
|
# Copyright (c) 2008 Red Hat, Inc. All rights reserved. This copyrighted material
|
|
# is made available to anyone wishing to use, modify, copy, or
|
|
# redistribute it subject to the terms and conditions of the GNU General
|
|
# Public License v.2.
|
|
#
|
|
# This program is distributed in the hope that it will be useful, but WITHOUT ANY
|
|
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
|
# PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
|
#
|
|
# You should have received a copy of the GNU General Public License
|
|
# along with this program; if not, write to the Free Software
|
|
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
|
|
|
|
PACKAGES="${PACKAGES:-php-cli}"
|
|
|
|
# Include Beaker environment
|
|
. /usr/share/beakerlib/beakerlib.sh || exit 1
|
|
|
|
rlJournalStart
|
|
|
|
######################
|
|
# Prepare environment
|
|
######################
|
|
rlPhaseStartSetup
|
|
rlAssertRpm --all
|
|
rlAssertBinaryOrigin "php"
|
|
rlRun "php -v"
|
|
rlRun "TmpDir=\$(mktemp -d)" 0 "Creating tmp directory"
|
|
rlRun "pushd $TmpDir"
|
|
rlPhaseEnd
|
|
|
|
######################
|
|
# Begin Test-Case
|
|
######################
|
|
rlPhaseStartTest
|
|
rlRun "php -r 'echo date(\"r\", strtotime(\"May 18th 5:05pm\"));'|egrep '1969|1970'" 1
|
|
rlRun "php -r 'echo date(\"r\", strtotime(\"May 18th 5:05 pm\"));'|egrep '1969|1970'" 1
|
|
rlPhaseEnd
|
|
|
|
######################
|
|
# Clean after the test
|
|
######################
|
|
rlPhaseStartCleanup
|
|
rlRun "popd"
|
|
rlRun "rm -r $TmpDir" 0 "Removing tmp directory"
|
|
rlPhaseEnd
|
|
|
|
rlJournalPrintText
|
|
rlJournalEnd
|
|
|