Mercurial Hosting > luan
diff scripts/test.luan @ 1369:709f7498a363
change Lucene.index() and add Lucene.recover()
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Wed, 19 Jun 2019 00:26:10 -0600 |
parents | d410747a671a |
children | 732b5de211fc |
line wrap: on
line diff
--- a/scripts/test.luan Tue Jun 18 21:56:53 2019 -0600 +++ b/scripts/test.luan Wed Jun 19 00:26:10 2019 -0600 @@ -36,11 +36,12 @@ page = run_page(require("luan:http/tools/Run.luan").respond) trim(page) == "hi" or error "failed" +--[[ init() Http.request.parameters.cmd = "'ab'..'cd'" page = run_page(require("luan:http/tools/Shell.luan").respond) find(page,"abcd") or error "failed" - +]] -- lucene @@ -48,7 +49,7 @@ local this_dir = this_file.parent() local lucene_dir = this_dir.parent().child("build").child("lucene_test") --print(lucene_dir.to_string()) -local db = Lucene.index(lucene_dir.to_string()) +local db = Lucene.index(lucene_dir) db.delete_all() local Web_search = require "luan:lucene/Web_search.luan" @@ -70,12 +71,14 @@ return Io.uri( "file:../website/src"..path ) end +--[[ init(); get_page "/" init(); get_page "/docs.html" init(); get_page "/tutorial.html" init(); get_page "/pil.html" init(); get_page "/manual.html" init(); get_page "/diff.html" +]] init(); get_page "/examples/hi.html" init(); get_page "/examples/hi2.html" init(); get_page "/examples/shell.html"