Mercurial Hosting > luan
diff src/luan/modules/http/Http_test.luan @ 1716:b82767112d8e
add String.regex
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Sun, 24 Jul 2022 23:43:03 -0600 |
parents | d9a5405a3102 |
children |
line wrap: on
line diff
--- a/src/luan/modules/http/Http_test.luan Sat Jul 23 21:53:04 2022 -0600 +++ b/src/luan/modules/http/Http_test.luan Sun Jul 24 23:43:03 2022 -0600 @@ -4,7 +4,7 @@ local Package = require "luan:Package.luan" local Io = require "luan:Io.luan" local String = require "luan:String.luan" -local matches = String.matches or error() +local ends_with = String.ends_with or error() local Http = require "luan:http/Http.luan" @@ -15,7 +15,7 @@ function Http_test.get_page(path) Http.request.path = path - if Http_test.welcome_file ~= nil and matches(path,"/$") then + if Http_test.welcome_file ~= nil and ends_with(path,"/") then path = path .. Http_test.welcome_file end local old_out = Io.stdout