- Timestamp:
- 01/23/12 07:00:46 (4 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/Release01x01/UnitTestContrib/test/unit/Fn_IF.pm
r13729 r13794 2 2 3 3 package Fn_IF; 4 5 4 use strict; 6 7 use FoswikiFnTestCase; 5 use warnings; 6 7 use FoswikiFnTestCase(); 8 8 our @ISA = qw( FoswikiFnTestCase ); 9 9 10 use Foswiki ;10 use Foswiki(); 11 11 use Error qw( :try ); 12 12 use Assert; … … 17 17 18 18 sub new { 19 my $self = shift()->SUPER::new( 'IF', @_ );20 my $dep = new Foswiki::Configure::Dependency(19 my ( $class, @args ) = @_; 20 my $dep = Foswiki::Configure::Dependency->new( 21 21 type => "perl", 22 22 module => "Foswiki", … … 24 24 ); 25 25 ( $post11, my $message ) = $dep->check(); 26 return $self; 26 27 return $class->SUPER::new( 'IF', @args ); 27 28 } 28 29 … … 30 31 my $this = shift; 31 32 $this->simpleTest( test => "'A'='B'", then => 0, else => 1 ); 33 34 return; 32 35 } 33 36 … … 35 38 my $this = shift; 36 39 $this->simpleTest( test => "'A'!='B'", then => 1, else => 0 ); 40 41 return; 37 42 } 38 43 … … 40 45 my $this = shift; 41 46 $this->simpleTest( test => "'A'='A'", then => 1, else => 0 ); 47 48 return; 42 49 } 43 50 … … 45 52 my $this = shift; 46 53 $this->simpleTest( test => "'A'='B'", then => 0, else => 1 ); 54 55 return; 47 56 } 48 57 … … 50 59 my $this = shift; 51 60 $this->simpleTest( test => 'context test', then => 1, else => 0 ); 61 62 return; 52 63 } 53 64 … … 55 66 my $this = shift; 56 67 $this->simpleTest( test => 'context \'test\'', then => 1, else => 0 ); 68 69 return; 57 70 } 58 71 … … 60 73 my $this = shift; 61 74 $this->simpleTest( test => "{Fnargle}='Fleeble'", then => 1, else => 0 ); 75 76 return; 62 77 } 63 78 … … 65 80 my $this = shift; 66 81 $this->simpleTest( test => "{A}{B}='C'", then => 1, else => 0 ); 82 83 return; 67 84 } 68 85 … … 75 92 else => 0 76 93 ); 94 95 return; 77 96 } 78 97 … … 85 104 else => 0 86 105 ); 106 107 return; 87 108 } 88 109 … … 92 113 93 114 # See test_96* for other 'defined' tests 115 116 return; 94 117 } 95 118 … … 141 164 else => 1 142 165 ); 166 167 return; 143 168 } 144 169 … … 146 171 my $this = shift; 147 172 $this->simpleTest( test => '0>1', then => 0, else => 1 ); 173 174 return; 148 175 } 149 176 … … 151 178 my $this = shift; 152 179 $this->simpleTest( test => '1>0', then => 1, else => 0 ); 180 181 return; 153 182 } 154 183 … … 156 185 my $this = shift; 157 186 $this->simpleTest( test => '1<0', then => 0, else => 1 ); 187 188 return; 158 189 } 159 190 … … 161 192 my $this = shift; 162 193 $this->simpleTest( test => '0<1', then => 1, else => 0 ); 194 195 return; 163 196 } 164 197 … … 166 199 my $this = shift; 167 200 $this->simpleTest( test => "0>=\t1", then => 0, else => 1 ); 201 202 return; 168 203 } 169 204 … … 171 206 my $this = shift; 172 207 $this->simpleTest( test => '1>=0', then => 1, else => 0 ); 208 209 return; 173 210 } 174 211 … … 176 213 my $this = shift; 177 214 $this->simpleTest( test => '1>=1', then => 1, else => 0 ); 215 216 return; 178 217 } 179 218 … … 181 220 my $this = shift; 182 221 $this->simpleTest( test => '1<=0', then => 0, else => 1 ); 222 223 return; 183 224 } 184 225 … … 186 227 my $this = shift; 187 228 $this->simpleTest( test => '0<=1', then => 1, else => 0 ); 229 230 return; 188 231 } 189 232 … … 191 234 my $this = shift; 192 235 $this->simpleTest( test => '1<=1', then => 1, else => 0 ); 236 237 return; 193 238 } 194 239 … … 196 241 my $this = shift; 197 242 $this->simpleTest( test => "not 'A'='B'", then => 1, else => 0 ); 243 244 return; 198 245 } 199 246 … … 201 248 my $this = shift; 202 249 $this->simpleTest( test => "not NOT 'A'='B'", then => 0, else => 1 ); 250 251 return; 203 252 } 204 253 … … 206 255 my $this = shift; 207 256 $this->simpleTest( test => "'A'='A' AND 'B'='B'", then => 1, else => 0 ); 257 258 return; 208 259 } 209 260 … … 211 262 my $this = shift; 212 263 $this->simpleTest( test => "'A'='A' and 'B'='B'", then => 1, else => 0 ); 264 265 return; 213 266 } 214 267 … … 216 269 my $this = shift; 217 270 $this->simpleTest( test => "'A'='A' and 'B'='B'", then => 1, else => 0 ); 271 272 return; 218 273 } 219 274 … … 225 280 else => 0 226 281 ); 282 283 return; 227 284 } 228 285 … … 230 287 my $this = shift; 231 288 $this->simpleTest( test => "'A'='B' or 'B'='B'", then => 1, else => 0 ); 289 290 return; 232 291 } 233 292 … … 235 294 my $this = shift; 236 295 $this->simpleTest( test => "'A'='A' or 'B'='A'", then => 1, else => 0 ); 296 297 return; 237 298 } 238 299 … … 240 301 my $this = shift; 241 302 $this->simpleTest( test => "'A'='B' or 'B'='A'", then => 0, else => 1 ); 303 304 return; 242 305 } 243 306 … … 249 312 else => 0 250 313 ); 314 315 return; 251 316 } 252 317 … … 258 323 else => 0 259 324 ); 325 326 return; 260 327 } 261 328 … … 263 330 my $this = shift; 264 331 $this->simpleTest( test => "'A'~'B'", then => 0, else => 1 ); 332 333 return; 265 334 } 266 335 … … 268 337 my $this = shift; 269 338 $this->simpleTest( test => "'ABLABA'~'*B?AB*'", then => 1, else => 0 ); 339 340 return; 270 341 } 271 342 … … 273 344 my $this = shift; 274 345 $this->simpleTest( test => '\"BABBA\"~\"*BB?\"', then => 1, else => 0 ); 346 347 return; 275 348 } 276 349 … … 278 351 my $this = shift; 279 352 $this->simpleTest( test => "lc('FRED')='fred'", then => 1, else => 0 ); 353 354 return; 280 355 } 281 356 … … 283 358 my $this = shift; 284 359 $this->simpleTest( test => "('FRED')=uc 'fred'", then => 1, else => 0 ); 360 361 return; 285 362 } 286 363 … … 293 370 else => 0 294 371 ); 372 373 return; 295 374 } 296 375 … … 302 381 else => 1 303 382 ); 383 384 return; 304 385 } 305 386 … … 307 388 my $this = shift; 308 389 $this->simpleTest( test => "1 = 1 > 0", then => 1, else => 0 ); 390 391 return; 309 392 } 310 393 … … 312 395 my $this = shift; 313 396 $this->simpleTest( test => "1 > 1 = 0", then => 1, else => 0 ); 397 398 return; 314 399 } 315 400 … … 317 402 my $this = shift; 318 403 $this->simpleTest( test => "not 1 = 2", then => 1, else => 0 ); 404 405 return; 319 406 } 320 407 … … 322 409 my $this = shift; 323 410 $this->simpleTest( test => "not not 1 and 1", then => 1, else => 0 ); 411 412 return; 324 413 } 325 414 … … 327 416 my $this = shift; 328 417 $this->simpleTest( test => "0 or not not 1 and 1", then => 1, else => 0 ); 418 419 return; 329 420 } 330 421 … … 339 430 else => 1 340 431 ); 432 433 return; 341 434 } 342 435 … … 352 445 else => 1 353 446 ); 447 448 return; 354 449 } 355 450 … … 361 456 else => 1 362 457 ); 458 459 return; 363 460 } 364 461 … … 373 470 else => 1 374 471 ); 472 473 return; 375 474 } 376 475 … … 386 485 else => 1 387 486 ); 487 488 return; 388 489 } 389 490 … … 397 498 else => 1 398 499 ); 500 501 return; 399 502 } 400 503 … … 411 514 else => 1 412 515 ); 516 517 return; 413 518 } 414 519 … … 422 527 else => 1 423 528 ); 529 530 return; 424 531 } 425 532 … … 433 540 else => 1 434 541 ); 542 543 return; 435 544 } 436 545 … … 447 556 else => 0 448 557 ); 558 559 return; 449 560 } 450 561 … … 458 569 else => 0 459 570 ); 571 572 return; 460 573 } 461 574 … … 470 583 else => 1 471 584 ); 585 586 return; 472 587 } 473 588 … … 479 594 else => 1 480 595 ); 596 597 return; 481 598 } 482 599 … … 488 605 else => 1 489 606 ); 607 608 return; 490 609 } 491 610 … … 497 616 else => 1 498 617 ); 618 619 return; 499 620 } 500 621 … … 506 627 else => 0 507 628 ); 629 630 return; 508 631 } 509 632 … … 515 638 else => 1 516 639 ); 640 641 return; 517 642 } 518 643 … … 525 650 else => 1 526 651 ); 652 653 return; 527 654 } 528 655 … … 535 662 else => 1 536 663 ); 664 665 return; 537 666 } 538 667 … … 544 673 else => 0 545 674 ); 675 676 return; 546 677 } 547 678 … … 553 684 else => 1 554 685 ); 686 687 return; 555 688 } 556 689 … … 563 696 else => 1 564 697 ); 698 699 return; 565 700 } 566 701 … … 573 708 else => 1 574 709 ); 710 711 return; 575 712 } 576 713 … … 582 719 else => 0 583 720 ); 721 722 return; 584 723 } 585 724 … … 591 730 else => 1 592 731 ); 732 733 return; 593 734 } 594 735 … … 601 742 else => 1 602 743 ); 744 745 return; 603 746 } 604 747 … … 611 754 else => 1 612 755 ); 756 757 return; 613 758 } 614 759 … … 620 765 else => 0 621 766 ); 767 768 return; 622 769 } 623 770 … … 631 778 else => 1 632 779 ); 780 781 return; 633 782 } 634 783 … … 642 791 else => 1 643 792 ); 793 794 return; 644 795 } 645 796 … … 654 805 else => 1 655 806 ); 807 808 return; 656 809 } 657 810 … … 665 818 else => 0 666 819 ); 820 821 return; 667 822 } 668 823 … … 676 831 else => 1 677 832 ); 833 834 return; 678 835 } 679 836 … … 687 844 else => 1 688 845 ); 846 847 return; 689 848 } 690 849 … … 699 858 else => 0 700 859 ); 860 861 return; 701 862 } 702 863 … … 710 871 else => 1 711 872 ); 873 874 return; 712 875 } 713 876 … … 721 884 else => 1 722 885 ); 886 887 return; 723 888 } 724 889 … … 732 897 else => 1 733 898 ); 899 900 return; 734 901 } 735 902 … … 744 911 else => 1 745 912 ); 913 914 return; 746 915 } 747 916 … … 753 922 else => 0 754 923 ); 924 925 return; 755 926 } 756 927 … … 762 933 else => 1 763 934 ); 935 936 return; 764 937 } 765 938 … … 773 946 else => 1 774 947 ); 948 949 return; 775 950 } 776 951 … … 785 960 else => 0 786 961 ); 962 963 return; 787 964 } 788 965 … … 794 971 else => 1 795 972 ); 973 974 return; 796 975 } 797 976 … … 803 982 else => 1 804 983 ); 984 985 return; 805 986 } 806 987 … … 814 995 else => 1 815 996 ); 997 998 return; 816 999 } 817 1000 … … 826 1009 else => 1 827 1010 ); 1011 1012 return; 828 1013 } 829 1014 … … 837 1022 else => 0 838 1023 ); 1024 1025 return; 839 1026 } 840 1027 … … 846 1033 else => 1 847 1034 ); 1035 1036 return; 848 1037 } 849 1038 … … 857 1046 else => 1 858 1047 ); 1048 1049 return; 859 1050 } 860 1051 … … 869 1060 else => 0 870 1061 ); 1062 1063 return; 871 1064 } 872 1065 … … 878 1071 else => 1 879 1072 ); 1073 1074 return; 880 1075 } 881 1076 … … 887 1082 else => 1 888 1083 ); 1084 1085 return; 889 1086 } 890 1087 … … 898 1095 else => 1 899 1096 ); 1097 1098 return; 900 1099 } 901 1100 … … 910 1109 else => 1 911 1110 ); 1111 1112 return; 912 1113 } 913 1114 … … 921 1122 else => 0 922 1123 ); 1124 1125 return; 923 1126 } 924 1127 … … 926 1129 my $this = shift; 927 1130 $this->simpleTest( test => "isweb 'System'", then => 1, else => 0 ); 1131 1132 return; 928 1133 } 929 1134 … … 931 1136 my $this = shift; 932 1137 $this->simpleTest( test => "isweb 'Not a web'", then => 0, else => 1 ); 1138 1139 return; 933 1140 } 934 1141 … … 936 1143 my $this = shift; 937 1144 $this->simpleTest( test => "istopic \$'System'", then => 0, else => 1 ); 1145 1146 return; 938 1147 } 939 1148 … … 941 1150 my $this = shift; 942 1151 $this->simpleTest( test => "istopic \$'Not a web'", then => 0, else => 1 ); 1152 1153 return; 943 1154 } 944 1155 … … 950 1161 else => 1 951 1162 ); 1163 1164 return; 952 1165 } 953 1166 … … 959 1172 else => 1 960 1173 ); 1174 1175 return; 961 1176 } 962 1177 … … 968 1183 else => 1 969 1184 ); 1185 1186 return; 970 1187 } 971 1188 … … 977 1194 else => 1 978 1195 ); 1196 1197 return; 979 1198 } 980 1199 … … 982 1201 my $this = shift; 983 1202 $this->simpleTest( test => "isweb \$ 'SYSTEMWEB'", then => 1, else => 0 ); 1203 1204 return; 984 1205 } 985 1206 … … 987 1208 my $this = shift; 988 1209 $this->simpleTest( test => 'defined \'SYSTEMWEB\'', then => 1, else => 0 ); 1210 1211 return; 989 1212 } 990 1213 … … 994 1217 995 1218 # see also test_9 and test_96* 1219 1220 return; 996 1221 } 997 1222 … … 999 1224 my $this = shift; 1000 1225 $this->simpleTest( test => 'defined( SYSTEMWEB )', then => 1, else => 0 ); 1226 1227 return; 1001 1228 } 1002 1229 … … 1004 1231 my $this = shift; 1005 1232 $this->simpleTest( test => "defined( 'SYSTEMWEB' )", then => 1, else => 0 ); 1233 1234 return; 1006 1235 } 1007 1236 … … 1009 1238 my $this = shift; 1010 1239 $this->simpleTest( test => 'defined( UNDEF )', then => 0, else => 1 ); 1240 1241 return; 1011 1242 } 1012 1243 … … 1014 1245 my $this = shift; 1015 1246 $this->simpleTest( test => "defined( 'UNDEF' )", then => 0, else => 1 ); 1247 1248 return; 1016 1249 } 1017 1250 … … 1019 1252 my $this = shift; 1020 1253 $this->simpleTest( test => 'defined \'IF\'', then => 1, else => 0 ); 1254 1255 return; 1021 1256 } 1022 1257 … … 1024 1259 my $this = shift; 1025 1260 $this->simpleTest( test => 'defined IF', then => 1, else => 0 ); 1261 1262 return; 1026 1263 } 1027 1264 … … 1039 1276 #print STDERR "catched error ".shift."\n"; 1040 1277 }; 1278 1279 return; 1041 1280 } 1042 1281 … … 1045 1284 $this->SUPER::set_up(@_); 1046 1285 1047 my $topicObject = Foswiki::Meta->new( 1048 $this->{session}, 1049 $this->{users_web}, 1050 "GropeGroup", 1051 " * Set GROUP = " 1052 . Foswiki::Func::getWikiName( $this->{session}->{user} ) . "\n" 1053 ); 1286 my ($topicObject) = 1287 Foswiki::Func::readTopic( $this->{users_web}, "GropeGroup" ); 1288 $topicObject->text( " * Set GROUP = " 1289 . Foswiki::Func::getWikiName( $this->{session}->{user} ) 1290 . "\n" ); 1054 1291 $topicObject->save(); 1292 $topicObject->finish(); 1055 1293 1056 1294 # Create WebHome topic to trap existance errors related to 1057 1295 # normalizeWebTopicName 1058 $topicObject = Foswiki::Meta->new( 1059 $this->{session}, $this->{test_web}, 1060 "WebHome", "Gormless gimboid\n" 1061 ); 1296 ($topicObject) = Foswiki::Func::readTopic( $this->{test_web}, "WebHome" ); 1297 $topicObject->text("Gormless gimboid\n"); 1062 1298 $topicObject->save(); 1299 $topicObject->finish(); 1300 1301 return; 1063 1302 } 1064 1303 … … 1090 1329 #print STDERR "$text => $result\n"; 1091 1330 $this->assert_equals( '1', $result, $text . " => " . $result ); 1331 1332 return; 1092 1333 } 1093 1334 … … 1095 1336 my $this = shift; 1096 1337 1097 my $topicObject=1098 Foswiki:: Meta->new( $this->{session}, $this->{test_web}, "DeadHerring",1099 <<'SMELL');1338 my ($topicObject) = 1339 Foswiki::Func::readTopic( $this->{test_web}, "DeadHerring" ); 1340 $topicObject->text( <<'SMELL'); 1100 1341 one %IF{ "defined NAME" then="1" else="0" }% 1101 1342 two %IF{ "$ NAME='%NAME%'" then="1" else="0" }% … … 1103 1344 SMELL 1104 1345 $topicObject->save(); 1346 $topicObject->finish(); 1105 1347 my $text = <<'PONG'; 1106 1348 %INCLUDE{"DeadHerring" NAME="Red" warn="on"}% … … 1108 1350 my $result = $this->{test_topicObject}->expandMacros($text); 1109 1351 $this->assert_matches( qr/^\s*one 1\s+two 1\s+three 1\s*$/s, $result ); 1352 1353 return; 1110 1354 } 1111 1355 … … 1130 1374 $this->assert_str_equals( $test->{expect}, $result ); 1131 1375 } 1376 1377 return; 1132 1378 } 1133 1379 … … 1135 1381 my $this = shift; 1136 1382 1137 my $topicObject=1138 Foswiki:: Meta->new( $this->{session}, $this->{test_web}, "DeadHerring",1139 <<'SMELL');1383 my ($topicObject) = 1384 Foswiki::Func::readTopic( $this->{test_web}, "DeadHerring" ); 1385 $topicObject->text( <<'SMELL'); 1140 1386 one %IF{ "BleaghForm.Wibble='Woo'" then="1" else="0" }% 1141 1387 %META:FORM{name="BleaghForm"}% … … 1143 1389 SMELL 1144 1390 $topicObject->save(); 1391 $topicObject->finish(); 1145 1392 my $text = <<'PONG'; 1146 1393 %INCLUDE{"DeadHerring" NAME="Red" warn="on"}% … … 1148 1395 my $result = $this->{test_topicObject}->expandMacros($text); 1149 1396 $this->assert_matches( qr/^\s*one 1\s*$/s, $result ); 1397 1398 return; 1150 1399 } 1151 1400 … … 1153 1402 my $this = shift; 1154 1403 my $wn = Foswiki::Func::getWikiName( $this->{session}->{user} ); 1155 my $meta = 1156 Foswiki::Meta->new( $this->{session}, $this->{test_web}, "DeadDog", 1157 <<PONG); 1404 my ($meta) = Foswiki::Func::readTopic( $this->{test_web}, "DeadDog" ); 1405 $meta->text( <<"PONG"); 1158 1406 * Set ALLOWTOPICVIEW = WibbleFloon 1159 1407 * Set ALLOWTOPICCHANGE = $wn 1160 1408 PONG 1161 1409 $meta->save(); 1410 $meta->finish(); 1162 1411 1163 1412 my @tests; … … 1297 1546 } 1298 1547 ); 1299 $this->{session}->finish(); 1300 my $request = new Unit::Request( {} ); 1548 my $request = Unit::Request->new( {} ); 1301 1549 $request->path_info("/$this->{test_web}/$this->{test_topic}"); 1302 $this->{session} = new Foswiki( undef, $request ); 1303 $meta = 1304 Foswiki::Meta->new( $this->{session}, $this->{test_web}, 1305 $this->{test_topic} ); 1550 $this->createNewFoswikiSession( undef, $request ); 1551 ($meta) = 1552 Foswiki::Func::readTopic( $this->{test_web}, $this->{test_topic} ); 1306 1553 1307 1554 foreach my $test (@tests) { … … 1311 1558 "$text: '$result'" ); 1312 1559 } 1560 $meta->finish(); 1561 1562 return; 1313 1563 } 1314 1564 … … 1318 1568 * Set LOOP = %IF{"$ LOOP = '1'" then="ping" else="pong"}% 1319 1569 PONG 1320 my $topicObject=1321 Foswiki:: Meta->new( $this->{session}, $this->{test_web},1322 $this->{test_topic}, $text);1570 my ($topicObject) = 1571 Foswiki::Func::readTopic( $this->{test_web}, $this->{test_topic} ); 1572 $topicObject->text($text); 1323 1573 $topicObject->save(); 1574 $topicObject->finish(); 1324 1575 my $result = $this->{test_topicObject}->expandMacros($text); 1325 1576 $this->assert_str_equals( " * Set LOOP = pong\n", $result ); 1577 1578 return; 1326 1579 } 1327 1580 … … 1331 1584 my $topicName = 'TopicInfo'; 1332 1585 1333 my $meta = 1334 Foswiki::Meta->new( $this->{session}, $this->{test_web}, $topicName, 1335 <<PONG); 1586 my ($meta) = Foswiki::Func::readTopic( $this->{test_web}, $topicName ); 1587 $meta->text( <<'PONG'); 1336 1588 oneapeny twoapenny we all fall down 1337 1589 PONG 1338 1590 $meta->save(); 1339 1340 $meta = 1341 Foswiki::Meta->load( $this->{session},$this->{test_web}, $topicName );1591 $meta->finish(); 1592 1593 ($meta) = Foswiki::Func::readTopic( $this->{test_web}, $topicName ); 1342 1594 $meta->getRevisionInfo(); 1343 1595 my $ti = $meta->get('TOPICINFO'); … … 1408 1660 "$text: '$result'" ); 1409 1661 } 1662 $meta->finish(); 1663 1664 return; 1410 1665 } 1411 1666 … … 1413 1668 my $this = shift; 1414 1669 $this->simpleTest( test => 'isempty notthere', then => 1, else => 0 ); 1670 1671 return; 1415 1672 } 1416 1673 … … 1419 1676 $this->simpleTest( test => 'defined empty', then => 1, else => 0 ); 1420 1677 $this->simpleTest( test => 'isempty empty', then => 1, else => 0 ); 1678 1679 return; 1421 1680 } 1422 1681 … … 1424 1683 my $this = shift; 1425 1684 $this->simpleTest( test => 'isempty notempty', then => 0, else => 1 ); 1685 1686 return; 1426 1687 } 1427 1688 … … 1429 1690 my $this = shift; 1430 1691 $this->simpleTest( test => 'isempty NOTTHERE', then => 1, else => 0 ); 1692 1693 return; 1431 1694 } 1432 1695 … … 1435 1698 $this->simpleTest( test => 'defined EMPTY', then => 1, else => 0 ); 1436 1699 $this->simpleTest( test => 'isempty EMPTY', then => 1, else => 0 ); 1700 1701 return; 1437 1702 } 1438 1703 … … 1440 1705 my $this = shift; 1441 1706 $this->simpleTest( test => 'isempty SNOTEMPTY', then => 0, else => 1 ); 1707 1708 return; 1442 1709 } 1443 1710 … … 1445 1712 my $this = shift; 1446 1713 $this->simpleTest( test => 'isempty SNOTTHERE', then => 1, else => 0 ); 1714 1715 return; 1447 1716 } 1448 1717 … … 1451 1720 $this->simpleTest( test => 'defined SEMPTY', then => 1, else => 0 ); 1452 1721 $this->simpleTest( test => 'isempty SEMPTY', then => 1, else => 0 ); 1722 1723 return; 1453 1724 } 1454 1725 … … 1456 1727 my $this = shift; 1457 1728 $this->simpleTest( test => 'isempty NOTEMPTY', then => 0, else => 1 ); 1729 1730 return; 1458 1731 } 1459 1732 … … 1461 1734 my $this = shift; 1462 1735 $this->simpleTest( test => "isempty ''", then => 1, else => 0 ); 1736 1737 return; 1463 1738 } 1464 1739 … … 1466 1741 my $this = shift; 1467 1742 $this->simpleTest( test => "isempty undef", then => 1, else => 0 ); 1743 1744 return; 1468 1745 } 1469 1746 … … 1695 1972 ); 1696 1973 1974 return; 1697 1975 } 1698 1976 … … 1721 1999 $this->simpleTest( test => "'0.0'", then => 1, else => 0 ); 1722 2000 $this->simpleTest( test => "''", then => 0, else => 1 ); 2001 2002 return; 1723 2003 } 1724 2004
Note: See TracChangeset
for help on using the changeset viewer.
