formatting
This commit is contained in:
@@ -1,2 +1,2 @@
|
|||||||
import requests_externs.Response;
|
import requests_externs.Response;
|
||||||
import requests_externs.Requests;
|
import requests_externs.Requests;
|
||||||
|
@@ -1,21 +1,13 @@
|
|||||||
// External programs can load Lib.kiss with (loadFrom "nat-archive-tool" "src/nat/Lib.kiss")
|
// External programs can load Lib.kiss with (loadFrom "nat-archive-tool" "src/nat/Lib.kiss")
|
||||||
(load "../nat/Lib.kiss")
|
(load "../nat/Lib.kiss")
|
||||||
|
|
||||||
(print "dicks")
|
|
||||||
|
|
||||||
(assert (BoolExpInterp.eval "true" []))
|
(assert (BoolExpInterp.eval "true" []))
|
||||||
(print "dicks")
|
|
||||||
(assert !(BoolExpInterp.eval "false" []))
|
(assert !(BoolExpInterp.eval "false" []))
|
||||||
(print "dicks")
|
|
||||||
(assert !(BoolExpInterp.eval "flag" []))
|
(assert !(BoolExpInterp.eval "flag" []))
|
||||||
(print "dicks")
|
|
||||||
(assert (BoolExpInterp.eval "flag" ["flag"]))
|
(assert (BoolExpInterp.eval "flag" ["flag"]))
|
||||||
(print "dicks")
|
|
||||||
(assert !(BoolExpInterp.eval "(and flag false)" ["flag"]))
|
(assert !(BoolExpInterp.eval "(and flag false)" ["flag"]))
|
||||||
(print "dicks")
|
|
||||||
(assert (BoolExpInterp.eval "(or flag otherFlag)" ["otherFlag"]))
|
(assert (BoolExpInterp.eval "(or flag otherFlag)" ["otherFlag"]))
|
||||||
|
|
||||||
(print "dicks")
|
|
||||||
(let [archive
|
(let [archive
|
||||||
(new Archive "src/test/example-archive")
|
(new Archive "src/test/example-archive")
|
||||||
song1
|
song1
|
||||||
@@ -23,7 +15,6 @@
|
|||||||
song2
|
song2
|
||||||
(dictGet archive.entries "song2")]
|
(dictGet archive.entries "song2")]
|
||||||
|
|
||||||
(print "dicks")
|
|
||||||
(assert (hasComponent song1 Tags))
|
(assert (hasComponent song1 Tags))
|
||||||
(assert (hasComponent song2 Tags))
|
(assert (hasComponent song2 Tags))
|
||||||
(assert (componentsMatch song1 "(and Name Author)"))
|
(assert (componentsMatch song1 "(and Name Author)"))
|
||||||
@@ -32,7 +23,6 @@
|
|||||||
(assert !(tagsMatch archive song1 "(and song religious)"))
|
(assert !(tagsMatch archive song1 "(and song religious)"))
|
||||||
(assert (tagsMatch archive song2 "(and song religious)"))
|
(assert (tagsMatch archive song2 "(and song religious)"))
|
||||||
(assert !(tagsMatch archive song2 "(and song western)"))
|
(assert !(tagsMatch archive song2 "(and song western)"))
|
||||||
(print "dicks")
|
|
||||||
|
|
||||||
(withWritableComponents archive song1
|
(withWritableComponents archive song1
|
||||||
[author Author
|
[author Author
|
||||||
@@ -40,8 +30,6 @@
|
|||||||
(assert (= author "Rafael Krux"))
|
(assert (= author "Rafael Krux"))
|
||||||
(assert (= name "Adventure"))))
|
(assert (= name "Adventure"))))
|
||||||
|
|
||||||
(print "dicks")
|
|
||||||
|
|
||||||
(let [wikipedia (new MediaWikiSystem "https://en.wikipedia.org/w/api.php" null null 1)]
|
(let [wikipedia (new MediaWikiSystem "https://en.wikipedia.org/w/api.php" null null 1)]
|
||||||
//~(wikipedia.queryProp ["Phoenix Wright"] ["images"])
|
//~(wikipedia.queryProp ["Phoenix Wright"] ["images"])
|
||||||
0
|
0
|
||||||
|
@@ -23,8 +23,9 @@ class Requests {
|
|||||||
return NativeRequests.get(url, mapToDict(params), kwArgs);
|
return NativeRequests.get(url, mapToDict(params), kwArgs);
|
||||||
}
|
}
|
||||||
|
|
||||||
static function mapToDict(?map:Map<String,String>) {
|
static function mapToDict(?map:Map<String, String>) {
|
||||||
if (map == null) return null;
|
if (map == null)
|
||||||
|
return null;
|
||||||
var dict = new Dict<String, String>();
|
var dict = new Dict<String, String>();
|
||||||
for (key => value in map) {
|
for (key => value in map) {
|
||||||
dict.set(key, value);
|
dict.set(key, value);
|
||||||
|
Reference in New Issue
Block a user