Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wishlist: new interfaces superlistof(), sublistof() #19

Open
karenetheridge opened this issue Nov 28, 2014 · 0 comments
Open

wishlist: new interfaces superlistof(), sublistof() #19

karenetheridge opened this issue Nov 28, 2014 · 0 comments
Labels

Comments

@karenetheridge
Copy link
Contributor

For testing portions of lists, we have the bag and set interfaces, but both of these are unordered. It would be nice to have interfaces that test ordered slices of lists.

Sadly, this does not work:

cmp_deeply(
    [ 'foo', 'bar', 'baz' ],
    [
        'foo',
        'bar',
        (any(ignore(), ())) x 20,   # from 0 to 20 extra elements
    ],
    'foo and bar appear in this order at the beginning of the list',
);

we get: ... 'got: array with 3 elements... expect: array with 22 elements' :/

@rjbs rjbs added the Wishlist label Jan 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants