This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-06-04
Channels
- # announcements (13)
- # asami (68)
- # babashka (19)
- # beginners (51)
- # calva (4)
- # cider (3)
- # clj-kondo (13)
- # clojure (161)
- # clojure-australia (3)
- # clojure-europe (21)
- # clojure-nl (4)
- # clojure-spec (9)
- # clojure-sweden (13)
- # clojure-uk (9)
- # clojured (14)
- # clojurescript (7)
- # conjure (4)
- # cursive (16)
- # data-science (2)
- # datalog (1)
- # figwheel-main (7)
- # graalvm (18)
- # helix (14)
- # introduce-yourself (1)
- # jackdaw (9)
- # jobs (1)
- # kaocha (1)
- # malli (8)
- # meander (8)
- # off-topic (7)
- # pathom (11)
- # proletarian (3)
- # shadow-cljs (29)
- # tools-deps (106)
- # xtdb (8)
I found a nifty thing that I hadn't thought of before, using gq
to reformat a hard to read test diff in the REPL output buffer:
👀 4
💯 2
Does anyone have tips for jumping to the location of failed tests? My idea would be to somehow load the filename and line number into the quickfix-list, but not sure on how to access the output buffer to do it
If anyone is interested, here is my quick hack for loading the errors into the quickfix list
exe bufwinnr('conjure-log-') . "wincmd w"
let l:lines = getline(search("^; Testing ", 'bn'), '$')
let l:lines_fail = filter(deepcopy(l:lines), { key, val -> val =~ '^; FAIL in' })
let l:lines_expect = filter(deepcopy(l:lines), { key, val -> val =~ '^; expected:' })
let l:lines_actual = filter(deepcopy(l:lines), { key, val -> val =~ '^; actual:' })
let l:lines_fail = map(l:lines_fail, { key, val-> join(split(split(split(split(val)[4], "(")[0], ")")[0], ":")[0:2], ":") })
let l:lines_expect = map(l:lines_expect, { key, val-> split(val, "; ")[0]})
let l:lines_actual = map(l:lines_actual, { key, val-> split(val, "; ")[0]})
let l:lines_join = map(l:lines_fail, { key, val-> val . ":" . l:lines_expect[key] . " " . l:lines_actual[key]})
cgetexpr l:lines_join
wincmd p
copen
please dont shoot me, vimscript is hard