| Å×½ºÆ® :: Ç°À§ * .tº¸´Ù ´Ù¸¥ ¸ðµâ¿¡ ÀåÄ¡ Å×½ºÆ®¸¦ ±â·ÏÇϽʽÿÀ. |
Áö±Ý ´Ù¿î·Îµå |
Å×½ºÆ® :: Ç°À§ ¼øÀ§ ¹× ¿ä¾à
- ƯÇã:
- Perl Artistic License
- °Ô½ÃÀÚ À̸§:
- Kenichi Ishigaki
- °Ô½ÃÀÚ À¥»çÀÌÆ®:
- http://search.cpan.org/~ishigaki/Test-UseAllModules-0.09/lib/Test/UseAllModules.pm
Å×½ºÆ® :: Ç°À§ ű×
Å×½ºÆ® :: Ç°À§ ¼³¸í
* .tº¸´Ù ´Ù¸¥ ¸ðµâ¿¡ ÀåÄ¡ Å×½ºÆ®¸¦ ÀÛ¼ºÇϽʽÿÀ. Test :: Classy´Â Å×½ºÆ® ÆÄÀÏ (t / some_test.t)º¸´Ù ´Ù¸¥ ¸ðµâº¸´Ù ´Ù¸¥ ¸ðµâ¿¡ À¯´Ö Å×½ºÆ®¸¦ ÀÛ¼ºÇÏ´Â Perl ¸ðµâÀÔ´Ï´Ù. lib 't / lib'¸¦ »ç¿ëÇϽʽÿÀ. Å×½ºÆ® :: °í±Þ; myApp :: model :: db; db; # Å×½ºÆ®¿¡¼ »ç¿ëÇÏ·Á´Â °ÍÀ» ÁغñÇϽʽÿÀ (¿øÇÏ´Â °æ¿ì) ³» $ db = myApp :: Model :: DB-> ¿¬°á; # myApp :: test :: load_tests_from 'myApp :: Test'¿¡ÀÖ´Â ¸ðµç Å×½ºÆ® ÆÐÅ°Áö¸¦·ÎµåÇϽʽÿÀ. # ¶Ç´Â explicity load_test 'myApp :: otherTest :: forsomething'; # ¸ðµ¨ ¼Ó¼º LIMIT_TESTS_BY '¸ðµ¨·Î¸¸ Å×½ºÆ®¸¦ Á¦ÇÑ ÇÒ ¼ö ÀÖ½À´Ï´Ù. # °¢ Å×½ºÆ®¸¦ ½ÇÇàÇϽʽÿÀ ($ db´Â Àμö·Î Àü´ÞµË´Ï´Ù) # ÀϹÝÀûÀ¸·Î ¿©±â¿¡¼ Å×½ºÆ® °èȹÀ» ¼±¾ð ÇÒ ÇÊ¿ä°¡ ¾ø½À´Ï´Ù. run_tests ($ db); # ¸î °¡Áö û°á ³¡ {$ DB-> ¿¬°á ²÷±â¸¦ ¼öÇàÇÏ°Ú½À´Ï´Ù. } À¯´Ö Å×½ºÆ® Ŭ·¡½º : ÆÐÅ°Áö myApp :: Test :: ¹º°¡; Å×½ºÆ® :: Classy :: Base; # TEST SUB FOR_SOME : TEST {MY ($ class, @args) = @_; # ÀϺΠ´ÜÀ§ Å×½ºÆ® OK 1, "Å×½ºÆ® :: ´õ ¸¹Àº ±â´ÉÀ» ±âº»ÀûÀ¸·Î »ç¿ëÇÒ ¼ö ÀÖ½À´Ï´Ù"; } # Unit Sub for_others¿¡¼ Å×½ºÆ® ¼ö¸¦ ¼±¾ð ÇÒ ¼ö ÀÖ½À´Ï´Ù. Å×½ºÆ® (2) {my ($ class, @args) = @_; 'ù ¹ø°'ÇÕ°Ý; Pass 'second'; } # Å×½ºÆ®´Â 'Skip'¼Ó¼º Sub ¾Æ YON_ANOTHER : TESTS (2) °Ç³Ê ¶Ù±â (ÀϺΠÀÌÀ¯·Î) {MY ($ class, @args) = @_; Æнº 'ÇÏÁö¸¸ÀÌ Å×½ºÆ®´Â °Ç³Ê ¶Û °ÍÀÔ´Ï´Ù.'; ½ÇÆÐÇÏÁö¸¸ÀÌ Å×½ºÆ®´Â °Ç³Ê ¶Ý´Ï´Ù. } # Todo´Â ¿¹»ó´ë·Î ÀÛµ¿ÇؾßÇÕ´Ï´Ù. SUB MAY_FAIL : TODO Å×½ºÆ® (¾î¶² ÀÌÀ¯·Î) {MY ($ class, @args) = @_; ¹«¾ð°¡°¡ ±¸Çö µÉ ¶§±îÁö '½ÇÆÐÇÑ'; } # limit sub test_for_model : Å×½ºÆ® ¸ðµ¨ {my ($ class, @args) = @_; # $ class-> test_nameÀ» »ç¿ëÇÏ¿© $ cash $ class-> test_nameÀÇ À̸§À» Ç¥½Ã ÇÒ ¼ö ÀÖ½À´Ï´Ù. # "test_for_model"} ¿ä±¸ »çÇ× : ¡¤ Perl.
Å×½ºÆ® :: Ç°À§ °ü·Ã ¼ÒÇÁÆ®¿þ¾î