Skip to content

Commit

Permalink
daq: fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
xu-cheng committed Aug 29, 2015
1 parent 940e146 commit afbd6cb
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion Formula/daq.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,19 @@ def install
end

test do
assert File.exist? "#{include}/daq.h"
(testpath/"test.c").write <<-EOS.undent
#include <daq.h>
#include <stdio.h>
int main()
{
DAQ_Module_Info_t* list;
int size = daq_get_module_list(&list);
daq_free_module_list(list, size);
return 0;
}
EOS
system ENV.cc, "test.c", "-L#{lib}", "-ldaq", "-o", "test"
system "./test"
end
end

0 comments on commit afbd6cb

Please sign in to comment.