-
-
Notifications
You must be signed in to change notification settings - Fork 12.1k
/
zork.rb
41 lines (37 loc) 路 1.91 KB
/
zork.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
class Zork < Formula
desc "Dungeon modified from FORTRAN to C"
homepage "https://github.com/devshane/zork"
url "https://github.com/devshane/zork/archive/refs/tags/v1.0.3.tar.gz"
sha256 "929871abae9be902d4fb592f2e76e52b58b386d208f127c826ae1d7b7bade9ef"
head "https://github.com/devshane/zork.git", branch: "master"
bottle do
sha256 arm64_sonoma: "2abffab6441cae3c3ca7247d1f0d313571ae873f536fb647b605bec580688d55"
sha256 arm64_ventura: "ec4836e8f767968119feea70913b248475a549d10f9dc78f1777b0cffc78dde7"
sha256 arm64_monterey: "506debc59ab6d891ce98da1bfe4c8a6e5604dc9a91cf225ed19fe3027544f3ea"
sha256 arm64_big_sur: "3f9f282ff618e0a31976bbae0b95e1fabcab2053cef50e2e54bce7877533bbec"
sha256 sonoma: "1baa8e6b8652a3e2097f4cf7bdd682aefc2257539ba3e2c128b67ead17a2dbe1"
sha256 ventura: "d3bee8f46195e47e19bf1772a6e2bc394f314d1730af2576590a65a24875a10c"
sha256 monterey: "6693bf5507881124657a5cbeb75fc6df3d2f21aafbecce1967212d631924a5cf"
sha256 big_sur: "d8138472c8d3b67db24ce72d03228081118aed98007d5280f6713f556fea337e"
sha256 catalina: "694460ddf13fb4e4f05ef49dde4472dcce56dbc7a945c99307d3e34e35301aa2"
sha256 mojave: "2c5a5b9e024a752e705b85c4420baf74aa27c5ed1088afbf043efadc7307aed3"
sha256 x86_64_linux: "b6205ffff9a5874f180fd92c609e23cbf079799d9c43523b9f05befde770f712"
end
uses_from_macos "ncurses"
def install
system "make", "DATADIR=#{share}", "BINDIR=#{bin}"
system "make", "install", "DATADIR=#{share}", "BINDIR=#{bin}", "MANDIR=#{man}"
end
test do
test_phrase = <<~EOS.chomp
Welcome to Dungeon.\t\t\tThis version created 11-MAR-91.
You are in an open field west of a big white house with a boarded
front door.
There is a small mailbox here.
>Opening the mailbox reveals:
A leaflet.
>
EOS
assert_equal test_phrase, pipe_output("#{bin}/zork", "open mailbox", 0)
end
end