tokuhirom / Test-Pretty

Other
20 stars 17 forks source link

dubious, test returned 1 when prove run with -Pretty #17

Open perlancar opened 10 years ago

perlancar commented 10 years ago

Tried this on my dist https://github.com/sharyanto/perl-SHARYANTO-Utils .

$ prove -Pretty t/detect_http_ua_simple.t | dux lins " " --format text-simple

  User-Agent Mozilla/5.0 (Windows NT 6.1; WOW64; rv:7.0.1) Gecko/20100101 Firefox/7.0.12011-10-16 20:23:00
    ✓  doesnt die
    ✓  gui
    ✓  not text browser
    ✓  browser
  User-Agent Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.8.1.6) Gecko/20070725 Firefox/2.0.0.6
    ✓  doesnt die
    ✓  gui
    ✓  not text browser
    ✓  browser
  User-Agent Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1)
    ✓  doesnt die
    ✓  gui
    ✓  not text browser
    ✓  browser
  User-Agent Opera/9.20 (Windows NT 6.0; U; en)
    ✓  doesnt die
    ✓  gui
    ✓  not text browser
    ✓  browser
  User-Agent Mozilla/5.0 (Windows NT 6.1) AppleWebKit/535.2 (KHTML, like Gecko) Chrome/18.6.872.0 Safari/535.2 UNTRUSTED/1.0 3gpp-gba UNTRUSTED/1.0
    ✓  doesnt die
    ✓  gui
    ✓  not text browser
    ✓  browser
  User-Agent Mozilla/5.0 (iPad; U; CPU OS 3_2 like Mac OS X; en-us) AppleWebKit/531.21.10 (KHTML, like Gecko) Version/4.0.4 Mobile/7B334b Safari/531.21.102011-10-16 20:23:50
    ✓  doesnt die
    ✓  gui
    ✓  not text browser
    ✓  browser
  User-Agent Mozilla/5.0 (Linux; U; Android 2.3.4; en-us; DROID BIONIC Build/5.5.1_84_DBN-55) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1
    ✓  doesnt die
    ✓  gui
    ✓  not text browser
    ✓  browser
  User-Agent BlackBerry9530/4.7.0.76 Profile/MIDP-2.0 Configuration/CLDC-1.1 VendorID/126
    ✓  doesnt die
    ✓  gui
    ✓  not text browser
    ✓  browser
  User-Agent User-Agent: Opera/9.80 (J2ME/MIDP; Opera Mini/6.1.25378/25.692; U; en) Presto/2.5.25 Version/10.54
    ✓  doesnt die
    ✓  gui
    ✓  not text browser
    ✓  browser
  User-Agent Mozilla/5.0 (compatible; MSIE 9.0; Windows Phone OS 7.5; Trident/5.0; IEMobile/9.0; NOKIA; Lumia 800)
    ✓  doesnt die
    ✓  gui
    ✓  not text browser
    ✓  browser
  User-Agent NokiaN90-1/3.0545.5.1 Series60/2.8 Profile/MIDP-2.0 Configuration/CLDC-1.1
    ✓  doesnt die
    ✓  gui
    ✓  not text browser
    ✓  browser
  Accept text/html, application/xml;q=0.9, application/xhtml+xml, image/png, image/webp, image/jpeg, image/gif, image/x-xbitmap, */*;q=0.1
    ✓  doesnt die
    ✓  gui
    ✓  not text browser
    ✓  browser
  User-Agent Links (2.5; Linux 3.2.0-1-amd64 x86_64; GNU C 4.6.2;OC text)
    ✓  doesnt die
    ✓  not gui
    ✓  text browser
    ✓  browser
  User-Agent ELinks/0.9.3 (textmode; Linux 2.6.11 i686; 79x24)
    ✓  doesnt die
    ✓  not gui
    ✓  text browser
    ✓  browser
  User-Agent Lynx/2.8.8dev.9 libwww-FM/2.14 SSL-MM/1.4.1 GNUTLS/2.12.14
    ✓  doesnt die
    ✓  not gui
    ✓  text browser
    ✓  browser
  User-Agent w3m/0.5.1
    ✓  doesnt die
    ✓  not gui
    ✓  text browser
    ✓  browser
  User-Agent Googlebot/2.1 ( http://www.googlebot.com/bot.html) 
    ✓  doesnt die
    ✓  not gui
    ✓  not text browser
    ✓  not browser
  User-Agent curl/7.23.1 (x86_64-pc-linux-gnu) libcurl/7.23.1 OpenSSL/1.0.0f zlib/1.2.3.4 libidn/1.23 libssh2/1.2.8 librtmp/2.3
    ✓  doesnt die
    ✓  not gui
    ✓  not text browser
    ✓  not browser
  Accept */*
    ✓  doesnt die
    ✓  not gui
    ✓  not text browser
    ✓  not browser

not ok
Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/1 subtests 

But ok without -Pretty:

$ prove t/detect_http_ua_simple.t; echo $?
t/detect_http_ua_simple.t .. ok    
All tests successful.
Files=1, Tests=19,  0 wallclock secs ( 0.01 usr  0.00 sys +  0.01 cusr  0.00 csys =  0.02 CPU)
Result: PASS
0
mjg17 commented 10 years ago

I observe the same with some of my tests. I've not been able to isolate the cause yet.