+SRC_FILE := tt.rkt
+
.PHONY: install
install:
raco pkg install --deps search-auto
.PHONY: test
test:
- raco test ./tt.rkt
+ raco test ./$(SRC_FILE)
.PHONY: remove
remove:
.PHONY: clean
clean:
rm -rf compiled
+
+### dev helpers ###
+# scmindent.rkt : https://github.com/ds26gte/scmindent
+# sponge : https://joeyh.name/code/moreutils
+.PHONY: indent
+indent:
+ scmindent.rkt < $(SRC_FILE) | sponge $(SRC_FILE)
(string-split str (regexp "[\r\n]+")))
(module+ test
- (check-equal? (str->lines "abc\ndef\n\nghi") '("abc" "def" "ghi")))
+ (check-equal? (str->lines "abc\ndef\n\nghi") '("abc" "def" "ghi")))
(define (str->msgs nick uri str)
(filter-map (λ (line) (str->msg nick uri line)) (str->lines str)))