ngspice: add a better test. (#3457)

Until now, we just called `ngspice -v`.  This adds a small SPICE test
circuit, does a short transient analysis on it, and quits.
This commit is contained in:
Johannes Maibaum 2016-07-31 05:27:20 +02:00 committed by Dominyk Tiller
parent a8a3c30b9d
commit 711be1dbe2

View file

@ -34,6 +34,18 @@ class Ngspice < Formula
end
test do
system "#{bin}/ngspice", "-v"
(testpath/"test.cir").write <<-EOS.undent
RC test circuit
v1 1 0 1
r1 1 2 1
c1 2 0 1 ic=0
.tran 100u 100m uic
.control
run
quit
.endc
.end
EOS
system "#{bin}/ngspice", "test.cir"
end
end