Changeset 87


Ignore:
Timestamp:
08/06/09 10:53:43 (3 years ago)
Author:
dom
Message:

text_printer now handles file deletions correctly.

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/doc/TODO

    r81 r87  
    44------------ 
    55 
    6 - text_printer doesn't yet handle file removals. 
    76- fixtures:make_tree doesn't like {file, "a", "a"} in tree. 
    87 
     
    1514- add a "run once" mode for directory_tester 
    1615- print file(line) for test errors too 
     16- remove or print to text =ERROR REPORT==== from tests which 
     17  voluntarily crash processes 
    1718- detect -include dependencies and recompile all when .hrl changes 
    1819- run tests in parallel 
  • trunk/src/text_printer.erl

    r77 r87  
    1111wait (Device) -> 
    1212    receive 
    13         {_, compiler, {Total, Done, _}} -> 
     13        {_, compiler, {Total, Done, _}} when Total > Done -> 
    1414            io: put_chars (Device, io_lib: fwrite ("Compiling ~p: ", [Total - Done])), 
    1515            compiling (Device); 
    16         {_, tester, {Total, Done, _}} -> 
     16        {_, tester, {Total, Done, _}} when Total > Done -> 
    1717            io: put_chars (Device, io_lib: fwrite ("Testing ~p: ", [Total - Done])), 
    1818            testing (Device); 
  • trunk/src/text_printer_test.erl

    r80 r87  
    77-export ([compile_output/0]). 
    88-export ([test_output/0]). 
     9-export ([file_deletion/0]). 
    910 
    1011compile_output () -> 
     
    4647    ok. 
    4748 
     49file_deletion () -> 
     50    P = spawn_link (text_printer, init, [self ()]), 
     51    P ! {self (), compiler, {2, 2, 2}}, 
     52    timeout = receive_io_request (P), 
     53    P ! {self (), tester, {1, 0, 0}}, 
     54    <<"Testing 1: ">> = receive_io_request (P), 
     55    P ! {self (), tester, {1, 1, 1}}, 
     56    <<".\n1/1 successfully tested.\n">> = receive_io_request (P), 
     57    ok. 
     58 
    4859warning () -> 
    4960    {"/dir/file.erl", [{12, erl_lint, {unused_function,{foo,1}}}]}. 
Note: See TracChangeset for help on using the changeset viewer.