remove the dummy test project files
This commit is contained in:
parent
25375715c7
commit
cab3bbc49d
@ -1,13 +1,10 @@
|
||||
(local faith (require :faith))
|
||||
(local fennel (require :fennel))
|
||||
(local {: create-client
|
||||
: ROOT-URI}
|
||||
(require :test.utils.client))
|
||||
(local {: create-client-with-files} (require :test.utils))
|
||||
|
||||
(local language (require :fennel-ls.language))
|
||||
(local utils (require :fennel-ls.utils))
|
||||
|
||||
(local filename (.. ROOT-URI "imaginary.fnl"))
|
||||
|
||||
(fn test-multi-sym-split []
|
||||
(faith.= ["foo"] (utils.multi-sym-split "foo" 2))
|
||||
@ -19,9 +16,8 @@
|
||||
nil)
|
||||
|
||||
(fn test-find-symbol []
|
||||
(let [state (doto (create-client)
|
||||
(: :open-file! filename "(match [1 2 4] [1 2 sym-one] sym-one)"))
|
||||
file (. state.server.files filename)
|
||||
(let [{: self : uri} (create-client-with-files "(match [1 2 4] [1 2 sym-one] sym-one)")
|
||||
file (. self.server.files uri)
|
||||
(symbol parents) (language.find-symbol file.ast 23)]
|
||||
(faith.= symbol (fennel.sym :sym-one))
|
||||
(faith.=
|
||||
@ -29,9 +25,8 @@
|
||||
(fennel.view parents {:one-line? true})
|
||||
"bad parents"))
|
||||
|
||||
(let [state (doto (create-client)
|
||||
(: :open-file! filename "(match [1 2 4] [1 2 sym-one] sym-one)"))
|
||||
file (. state.server.files filename)
|
||||
(let [{: self : uri} (create-client-with-files "(match [1 2 4] [1 2 sym-one] sym-one)")
|
||||
file (. self.server.files uri)
|
||||
(symbol parents) (language.find-symbol file.ast 18)]
|
||||
(faith.= symbol nil)
|
||||
(faith.=
|
||||
@ -41,14 +36,9 @@
|
||||
nil)
|
||||
|
||||
(fn test-failure []
|
||||
(let [self (create-client)
|
||||
state (require :fennel-ls.state)
|
||||
searcher (require :fennel-ls.searcher)]
|
||||
(faith.not= nil (searcher.lookup self.server :crash-files.test1))
|
||||
(faith.not= nil (state.get-by-module self.server :crash-files.test1)))
|
||||
;; TODO turn off TESTING=1 in makefile
|
||||
; (faith.not= nil (searcher.lookup self.server :crash-files.test2))
|
||||
; (faith.not= nil (state.get-by-module self.server :crash-files.test2)))
|
||||
(create-client-with-files "(macro foo {} nil)
|
||||
(λ test {} nil)
|
||||
(λ {} nil")
|
||||
nil)
|
||||
|
||||
(fn test-split-spaces []
|
||||
|
||||
@ -1,7 +0,0 @@
|
||||
; things that caused fennel-ls to crash in the past
|
||||
(macro foo {} nil)
|
||||
(λ test {} nil)
|
||||
(λ {} nil)
|
||||
(fn foo.bar [] nil)
|
||||
|
||||
nil
|
||||
@ -1,2 +0,0 @@
|
||||
;; fennel-ls: macro-file
|
||||
(f)
|
||||
@ -1,6 +0,0 @@
|
||||
;; this file isn't used in any tests yet
|
||||
|
||||
(let [foo true]
|
||||
(an-unknown-mystery-global)) ;; the global should be an error, but ideally the compiler should keep going
|
||||
|
||||
(do do) ;; this should be a compiler error, I don't mind if the compiler can't go past this one
|
||||
@ -1,65 +0,0 @@
|
||||
(local foo (require :foo))
|
||||
(require :bar)
|
||||
(local {: bazfn} (require :baz))
|
||||
|
||||
(fn bar [a b]
|
||||
(print a b)
|
||||
(local c 10)
|
||||
(foo.my-export c))
|
||||
|
||||
(bar 1 2)
|
||||
|
||||
(print bazfn)
|
||||
|
||||
(let [bar "shadowed"]
|
||||
(print bar))
|
||||
|
||||
(fn test [{: foo}]
|
||||
(let [a 10]
|
||||
(match [0 10]
|
||||
[1 a] a
|
||||
[0 b] b))
|
||||
(print foo))
|
||||
|
||||
(fn b []
|
||||
(print "function"))
|
||||
|
||||
(local obj {: bar :a b})
|
||||
|
||||
(obj.bar 2 3)
|
||||
(obj:a)
|
||||
|
||||
(local redefinition b)
|
||||
|
||||
(local findme 10)
|
||||
(local deep {:a {:b {:field findme}}})
|
||||
(local {:a {:b shallow}} deep)
|
||||
(local mixed [{:key [5 {:foo shallow}]}])
|
||||
(local [{:key [_ {:foo funny}]}] mixed)
|
||||
(print funny.field)
|
||||
|
||||
(local findme 10) ;; via field access instead of destructure
|
||||
(local deep {:a {:b {:field findme}}})
|
||||
(local shallow deep.a.b)
|
||||
(local mixed [{:key [5 {:foo shallow}]}])
|
||||
(local funny (. mixed 1 :key 2 :foo))
|
||||
(print funny.field)
|
||||
|
||||
(local object (do (let [a 10] {:my-definition :here})))
|
||||
|
||||
(local module {})
|
||||
(fn module.my-function [a b c] "docstring" (let [body (+ a b c)] body))
|
||||
(module.my-function 1 2 3)
|
||||
|
||||
(local x {:y {:z (+ 1 1)}})
|
||||
(print x.y.z)
|
||||
|
||||
(fn other [x]
|
||||
(print x))
|
||||
(print x)
|
||||
|
||||
(for [i 1 10]
|
||||
(other i))
|
||||
|
||||
(each [k {: v} (pairs x)]
|
||||
k v)
|
||||
Loading…
Reference in New Issue
Block a user