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:
parent
a8a3c30b9d
commit
711be1dbe2
1 changed files with 13 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue