devtodo: add a test (#23097)

This commit is contained in:
Utkarsh Tripathi 2018-01-21 01:59:30 +05:30 committed by ilovezfs
parent d2d19c9078
commit 5ba27b5403

View file

@ -30,6 +30,17 @@ class Devtodo < Formula
system "make", "install"
doc.install "contrib"
end
test do
(testpath/"test").write <<~EOS
spawn #{bin}/devtodo --add HomebrewWork
expect "priority*"
send -- "2\r"
expect eof
EOS
system "expect", "-f", "test"
assert_match "HomebrewWork", (testpath/".todo").read
end
end
__END__