[Toybox] factor tests broken by commit	e8427bfd008be233aadea49e89075451c8a9ceee
    Rob Landley 
    rob at landley.net
       
    Sat Mar 12 10:03:13 PST 2016
    
    
  
On 03/11/2016 11:49 PM, Andy Chu wrote:
> https://github.com/landley/toybox/commit/e8427bfd008be233aadea49e89075451c8a9ceee
> 
> Before this commit, the first test in tests/factor.test succeeds:
> 
> testing "factor -32" "factor -32" "-32: -1 2 2 2 2 2\n" "" ""
> 
> After this commit, it fails.
> 
> $ make test_factor
> ...
> FAIL: factor -32
> 
> 
> FWIW, GNU coreutils factor doesn't care about negative numbers, so the
> right fix might be just to get rid of the test case and get rid of the
> (l < 0) check.  Although then strtoul seems to convert the '-1' to a
> large unsigned long, so probably another check is needed.
Yeah, the test and l < 0 are both obsolete, should have been fixed in
that commit.
Also, the type should probably be "long long".
Thanks for the heads up.
Rob
 1457805793.0
    
    
More information about the Toybox
mailing list