Development

#3461: lime.patch

You must first sign up to be able to contribute.

Ticket #3461: lime.patch

File lime.patch, 13.0 kB (added by sean, 5 months ago)

patch to get lime tests passing + add tests for broken assertion

  • tests/phpt/isa_ok.phpt

    old new  
    99--EXPECT-- 
    1010ok 1 
    11111..1 
     12 Looks like everything went fine. 
  • tests/phpt/todo_name.phpt

    old new  
    88--EXPECT-- 
    99ok 1 # TODO test name 
    10101..1 
     11 Looks like everything went fine. 
  • tests/phpt/skip.phpt

    old new  
    88--EXPECT-- 
    99ok 1 # SKIP 
    10101..1 
     11 Looks like everything went fine. 
  • tests/phpt/skip_name.phpt

    old new  
    99ok 1 # SKIP test name 
    1010ok 2 # SKIP test name 
    11111..2 
     12 Looks like everything went fine. 
  • tests/phpt/cmp_ok.phpt

    old new  
    88--EXPECT-- 
    99ok 1 
    10101..1 
     11 Looks like everything went fine. 
  • tests/phpt/cmp_ok_name.phpt

    old new  
    88--EXPECT-- 
    99ok 1 - test name 
    10101..1 
     11 Looks like everything went fine. 
  • tests/phpt/ok_name.phpt

    old new  
    88--EXPECT-- 
    99ok 1 - test name 
    10101..1 
     11 Looks like everything went fine. 
  • tests/phpt/is_name.phpt

    old new  
    88--EXPECT-- 
    99ok 1 - test name 
    10101..1 
     11 Looks like everything went fine. 
  • tests/phpt/fail_name.phpt

    old new  
    99not ok 1 - test name 
    1010#     Failed test (./tests/phpt/fail_name.php at line 3) 
    11111..1 
    12 # Looks like you failed 1 tests of 1. 
     12 Looks like you failed 1 tests of 1. 
  • tests/phpt/include_ok.phpt

    old new  
    33--FILE-- 
    44<?php 
    55require_once(dirname(__FILE__).'/setup.php'); 
    6 $t->include_ok(dirname(__FILE__).'/setup.php'); 
     6$t->include_ok(dirname(__FILE__).'/include_test.php'); 
    77?> 
    88--EXPECT-- 
    99ok 1 
    10101..1 
     11 Looks like everything went fine. 
  • tests/phpt/include_ok_name.phpt

    old new  
    33--FILE-- 
    44<?php 
    55require_once(dirname(__FILE__).'/setup.php'); 
    6 $t->include_ok(dirname(__FILE__).'/setup.php', 'test name'); 
     6$t->include_ok(dirname(__FILE__).'/include_test.php', 'test name'); 
    77?> 
    88--EXPECT-- 
    99ok 1 - test name 
    10101..1 
     11 Looks like everything went fine. 
  • tests/phpt/isnt.phpt

    old new  
    88--EXPECT-- 
    99ok 1 
    10101..1 
     11 Looks like everything went fine. 
  • tests/phpt/is_deeply_name.phpt

    old new  
    88--EXPECT-- 
    99ok 1 - test name 
    10101..1 
     11 Looks like everything went fine. 
  • tests/phpt/like_name.phpt

    old new  
    88--EXPECT-- 
    99ok 1 - test name 
    10101..1 
     11 Looks like everything went fine. 
  • tests/phpt/like.phpt

    old new  
    88--EXPECT-- 
    99ok 1 
    10101..1 
     11 Looks like everything went fine. 
  • tests/phpt/ok_fails.phpt

    old new  
    99not ok 1 
    1010#     Failed test (./tests/phpt/ok_fails.php at line 3) 
    11111..1 
    12 # Looks like you failed 1 tests of 1. 
     12 Looks like you failed 1 tests of 1. 
  • tests/phpt/unlike_name.phpt

    old new  
    88--EXPECT-- 
    99ok 1 - test name 
    10101..1 
     11 Looks like everything went fine. 
  • tests/phpt/is_fails.phpt

    old new  
    1111#            got: false 
    1212#       expected: true 
    13131..1 
    14 # Looks like you failed 1 tests of 1. 
     14 Looks like you failed 1 tests of 1. 
  • tests/phpt/is_deeply_fails.phpt

    old new  
    44<?php 
    55require_once(dirname(__FILE__).'/setup.php'); 
    66$t->is_deeply(array(1, 2, array(1 => 'foo', 'a' => '4')), array(1, 2, array(1 => 'bar', 'a' => '4'))); 
     7$t->is_deeply(array(1, 2, 3), array()); 
     8$t->is_deeply(array(), array(1, 2, 3)); 
    79?> 
    810--EXPECT-- 
    911not ok 1 
    1012#     Failed test (./tests/phpt/is_deeply_fails.php at line 3) 
    1113#            got: array (  0 => 1,  1 => 2,  2 =>   array (    1 => 'foo',    'a' => '4',  ),) 
    1214#       expected: array (  0 => 1,  1 => 2,  2 =>   array (    1 => 'bar',    'a' => '4',  ),) 
    13 1..1 
    14 # Looks like you failed 1 tests of 1. 
     15not ok 2 
     16#     Failed test (./tests/phpt/is_deeply_fails.php at line 4) 
     17#            got: array (  0 => 1,  1 => 2,  2 => 3,) 
     18#       expected: array () 
     19not ok 3 
     20#     Failed test (./tests/phpt/is_deeply_fails.php at line 5) 
     21#            got: array () 
     22#       expected: array (  0 => 1,  1 => 2,  2 => 3,) 
     231..3 
     24 Looks like you failed 3 tests of 3. 
  • tests/phpt/include_test.php

    old new  
     1<?php 
     2$include_test_var = 23; 
     3?> 
  • tests/phpt/isa_ok_name.phpt

    old new  
    99--EXPECT-- 
    1010ok 1 - test name 
    11111..1 
     12 Looks like everything went fine. 
  • tests/phpt/todo.phpt

    old new  
    88--EXPECT-- 
    99ok 1 # TODO 
    10101..1 
     11 Looks like everything went fine. 
  • tests/phpt/unlike_fails.phpt

    old new  
    1111#                'test01' 
    1212#       matches '/test\d+/' 
    13131..1 
    14 # Looks like you failed 1 tests of 1. 
     14 Looks like you failed 1 tests of 1. 
  • tests/phpt/pass_name.phpt

    old new  
    88--EXPECT-- 
    99ok 1 - test name 
    10101..1 
     11 Looks like everything went fine. 
  • tests/phpt/pass.phpt

    old new  
    88--EXPECT-- 
    99ok 1 
    10101..1 
     11 Looks like everything went fine. 
  • tests/phpt/can_ok_fails.phpt

    old new  
    1111#     Failed test (./tests/phpt/can_ok_fails.php at line 4) 
    1212#       method 'foo' does not exist 
    13131..1 
    14 # Looks like you failed 1 tests of 1. 
     14 Looks like you failed 1 tests of 1. 
  • tests/phpt/ok.phpt

    old new  
    88--EXPECT-- 
    99ok 1 
    10101..1 
     11 Looks like everything went fine. 
  • tests/phpt/fail.phpt

    old new  
    99not ok 1 
    1010#     Failed test (./tests/phpt/fail.php at line 3) 
    11111..1 
    12 # Looks like you failed 1 tests of 1. 
     12 Looks like you failed 1 tests of 1. 
  • tests/phpt/is.phpt

    old new  
    88--EXPECT-- 
    99ok 1 
    10101..1 
     11 Looks like everything went fine. 
  • tests/phpt/is_deeply.phpt

    old new  
    88--EXPECT-- 
    99ok 1 
    10101..1 
     11 Looks like everything went fine. 
  • tests/phpt/isnt_name.phpt

    old new  
    88--EXPECT-- 
    99ok 1 - test name 
    10101..1 
     11 Looks like everything went fine. 
  • tests/phpt/isa_ok_fails.phpt

    old new  
    1111#     Failed test (./tests/phpt/isa_ok_fails.php at line 4) 
    1212#       isa_ok isn't a 'Foo' it's a 'Test' 
    13131..1 
    14 # Looks like you failed 1 tests of 1. 
     14 Looks like you failed 1 tests of 1. 
  • tests/phpt/cmp_ok_fails.phpt

    old new  
    1212#           > 
    1313#       1 
    14141..1 
    15 # Looks like you failed 1 tests of 1. 
     15 Looks like you failed 1 tests of 1. 
  • tests/phpt/unlike.phpt

    old new  
    88--EXPECT-- 
    99ok 1 
    10101..1 
     11 Looks like everything went fine. 
  • tests/phpt/can_ok.phpt

    old new  
    99--EXPECT-- 
    1010ok 1 
    11111..1 
     12 Looks like everything went fine. 
  • tests/phpt/can_ok_name.phpt

    old new  
    99--EXPECT-- 
    1010ok 1 - test name 
    11111..1 
     12 Looks like everything went fine. 
  • tests/phpt/include_ok_fails.phpt

    old new  
    1010#     Failed test (./tests/phpt/include_ok_fails.php at line 3) 
    1111#       Tried to include 'foo.php' 
    12121..1 
    13 # Looks like you failed 1 tests of 1. 
     13 Looks like you failed 1 tests of 1. 
  • tests/phpt/isnt_fails.phpt

    old new  
    1212#           ne 
    1313#       false 
    14141..1 
    15 # Looks like you failed 1 tests of 1. 
     15 Looks like you failed 1 tests of 1. 
  • tests/phpt/like_fails.phpt

    old new  
    1111#                     'tests01' 
    1212#       doesn't match '/test\d+/' 
    13131..1 
    14 # Looks like you failed 1 tests of 1. 
     14 Looks like you failed 1 tests of 1. 
  • lib/lime.php

    old new  
    240240    { 
    241241      ksort($var1); 
    242242      ksort($var2); 
    243       if (array_diff(array_keys($var1), array_keys($var2))) 
     243 
     244      $keys1 = array_keys($var1); 
     245      $keys2 = array_keys($var2); 
     246      if (array_diff($keys1, $keys2) || array_diff($keys2, $keys1)) 
    244247      { 
    245248        return false; 
    246249      }