Mercurial > vim
annotate src/testdir/test70.in @ 18669:9007e9896303 v8.1.2326
patch 8.1.2326: cannot parse a date/time string
Commit: https://github.com/vim/vim/commit/10455d43fef041309ce0613fa792c635dd71e3a8
Author: Bram Moolenaar <Bram@vim.org>
Date: Thu Nov 21 15:36:18 2019 +0100
patch 8.1.2326: cannot parse a date/time string
Problem: Cannot parse a date/time string.
Solution: Add strptime(). (Stephen Wall, closes #)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Thu, 21 Nov 2019 15:45:03 +0100 |
parents | 0cdb6ac20748 |
children |
rev | line source |
---|---|
2050 | 1 Smoke test for MzScheme interface and mzeval() function |
2 | |
3 STARTTEST | |
4 :so mzscheme.vim | |
5 :set nocompatible viminfo+=nviminfo | |
6 :function! MzRequire() | |
7 :redir => l:mzversion | |
8 :mz (version) | |
9 :redir END | |
10 :if strpart(l:mzversion, 1, 1) < "4" | |
11 :" MzScheme versions < 4.x: | |
12 :mz (require (prefix vim- vimext)) | |
13 :else | |
14 :" newer versions: | |
15 :mz (require (prefix-in vim- 'vimext)) | |
16 :mz (require r5rs) | |
17 :endif | |
18 :endfunction | |
19 :silent call MzRequire() | |
20 :mz (define l '("item0" "dictionary with list OK" "item2")) | |
21 :mz (define h (make-hash)) | |
22 :mz (hash-set! h "list" l) | |
23 /^1 | |
24 :" change buffer contents | |
25 :mz (vim-set-buff-line (vim-eval "line('.')") "1 changed line 1") | |
26 :" scalar test | |
27 :let tmp_string = mzeval('"string"') | |
17930
0cdb6ac20748
patch 8.1.1961: more functions can be used as a method
Bram Moolenaar <Bram@vim.org>
parents:
4088
diff
changeset
|
28 :let tmp_1000 = '1000'->mzeval() |
2050 | 29 :if tmp_string . tmp_1000 == "string1000" |
30 :let scalar_res = "OK" | |
31 :else | |
32 :let scalar_res = "FAILED" | |
33 :endif | |
34 :call append(search("^1"), "scalar test " . scalar_res) | |
35 :" dictionary containing a list | |
36 :let tmp = mzeval("h")["list"][1] | |
37 :/^2/put =tmp | |
38 :" circular list (at the same time test lists containing lists) | |
39 :mz (set-car! (cddr l) l) | |
40 :let l2 = mzeval("h")["list"] | |
4088 | 41 :if l2[2] == l2 |
2050 | 42 :let res = "OK" |
43 :else | |
4074 | 44 :let res = "FAILED: " . l2[2] |
2050 | 45 :endif |
46 :call setline(search("^3"), "circular test " . res) | |
4074 | 47 :" funcrefs |
48 :mz (define vim:max (vim-eval "function('max')")) | |
49 :mz (define m (vim:max '(1 100 8))) | |
50 :let m = mzeval('m') | |
51 :if m == 100 | |
52 :let fref_res = "OK" | |
53 :else | |
54 :let fref_res = "FAILED: " . m | |
55 :end | |
56 :call append(line('$'), 'funcrefs '. fref_res) | |
2050 | 57 :?^1?,$w! test.out |
58 :qa! | |
59 ENDTEST | |
60 | |
61 1 line 1 | |
62 2 line 2 | |
63 3 line 3 |