Commit 47acafd3979ab986c53c6ac9b7a14f1fe4ad6519

  • avatar
  • Duke Leto <jonathan @le…o.net>
  • Fri Feb 12 09:44:00 CET 2010
Add a few tests for all_matches
t/03-util.t
(11 / 1)
  
1717}
1818
1919sub run_tests () {
20 plan(46);
20 plan(49);
2121
2222 test_hash_exists();
2323 test_hash_keys();
2424 test_hash_values();
2525 test_hash_kv();
2626
27 test_all_matches();
28
2729 test_set_from_array();
2830
2931 test_subst();
3434 test_is_dir();
3535
3636 test_qx();
37}
38
39sub test_all_matches() {
40 my @matches;
41 @matches := all_matches(/ab?d?x?c/,"abc y adcef x axcfoo twiddle");
42 is(@matches[0],'abc','all_matches found abc');
43 is(@matches[1],'adc','all_matches found adc');
44 is(@matches[2],'axc','all_matches found axc');
3745}
3846
3947sub test_hash_exists() {