annotate src/testdir/test104.in @ 8388:f5972de59001 v7.4.1486

commit https://github.com/vim/vim/commit/f3654827368e6204608036353a0360e9e7c21e02 Author: Bram Moolenaar <Bram@vim.org> Date: Fri Mar 4 22:12:23 2016 +0100 patch 7.4.1486 Problem: ":loadplugin" is not optimal, some people find it confusing. Solution: Only use ":packadd" with an optional "!".
author Christian Brabandt <cb@256bit.org>
date Fri, 04 Mar 2016 22:15:04 +0100
parents 839cca5ec18d
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
5770
839cca5ec18d updated for version 7.4.229
Bram Moolenaar <bram@vim.org>
parents: 5641
diff changeset
1 Tests for :let. vim: set ft=vim ts=8 :
5641
22387c8eec43 updated for version 7.4.167
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
2
22387c8eec43 updated for version 7.4.167
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
3 STARTTEST
22387c8eec43 updated for version 7.4.167
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
4 :so small.vim
22387c8eec43 updated for version 7.4.167
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
5 :set runtimepath+=./sautest
22387c8eec43 updated for version 7.4.167
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
6 :" Test to not autoload when assigning. It causes internal error.
22387c8eec43 updated for version 7.4.167
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
7 :try
22387c8eec43 updated for version 7.4.167
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
8 : let Test104#numvar = function('tr')
22387c8eec43 updated for version 7.4.167
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
9 : $put ='OK: ' . string(Test104#numvar)
22387c8eec43 updated for version 7.4.167
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
10 :catch
22387c8eec43 updated for version 7.4.167
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
11 : $put ='FAIL: ' . v:exception
22387c8eec43 updated for version 7.4.167
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
12 :endtry
5770
839cca5ec18d updated for version 7.4.229
Bram Moolenaar <bram@vim.org>
parents: 5641
diff changeset
13 :let a = 1
839cca5ec18d updated for version 7.4.229
Bram Moolenaar <bram@vim.org>
parents: 5641
diff changeset
14 :let b = 2
839cca5ec18d updated for version 7.4.229
Bram Moolenaar <bram@vim.org>
parents: 5641
diff changeset
15 :for letargs in ['a b', '{0 == 1 ? "a" : "b"}', '{0 == 1 ? "a" : "b"} a', 'a {0 == 1 ? "a" : "b"}']
839cca5ec18d updated for version 7.4.229
Bram Moolenaar <bram@vim.org>
parents: 5641
diff changeset
16 : try
839cca5ec18d updated for version 7.4.229
Bram Moolenaar <bram@vim.org>
parents: 5641
diff changeset
17 : redir => messages
839cca5ec18d updated for version 7.4.229
Bram Moolenaar <bram@vim.org>
parents: 5641
diff changeset
18 : execute 'let' letargs
839cca5ec18d updated for version 7.4.229
Bram Moolenaar <bram@vim.org>
parents: 5641
diff changeset
19 : redir END
839cca5ec18d updated for version 7.4.229
Bram Moolenaar <bram@vim.org>
parents: 5641
diff changeset
20 : $put ='OK:'
839cca5ec18d updated for version 7.4.229
Bram Moolenaar <bram@vim.org>
parents: 5641
diff changeset
21 : $put =split(substitute(messages, '\n', '\0 ', 'g'), '\n')
839cca5ec18d updated for version 7.4.229
Bram Moolenaar <bram@vim.org>
parents: 5641
diff changeset
22 : catch
839cca5ec18d updated for version 7.4.229
Bram Moolenaar <bram@vim.org>
parents: 5641
diff changeset
23 : $put ='FAIL: ' . v:exception
839cca5ec18d updated for version 7.4.229
Bram Moolenaar <bram@vim.org>
parents: 5641
diff changeset
24 : redir END
839cca5ec18d updated for version 7.4.229
Bram Moolenaar <bram@vim.org>
parents: 5641
diff changeset
25 : endtry
839cca5ec18d updated for version 7.4.229
Bram Moolenaar <bram@vim.org>
parents: 5641
diff changeset
26 :endfor
5641
22387c8eec43 updated for version 7.4.167
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
27 :/^Results/,$wq! test.out
22387c8eec43 updated for version 7.4.167
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
28 ENDTEST
22387c8eec43 updated for version 7.4.167
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
29
22387c8eec43 updated for version 7.4.167
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
30 Results of test104: