Mercurial > vim
annotate src/testdir/test_channel_write.py @ 27934:c8d6c2736796 v8.2.4492
patch 8.2.4492: no error if an option is given a value with ":let &opt = val"
Commit: https://github.com/vim/vim/commit/8ccbbeb620dcc73154de29c51100fe815cefe109
Author: Bram Moolenaar <Bram@vim.org>
Date: Wed Mar 2 19:49:38 2022 +0000
patch 8.2.4492: no error if an option is given a value with ":let &opt = val"
Problem: No error if an option is given an invalid value with
":let &opt = val".
Solution: Give the error. (closes #9864)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Wed, 02 Mar 2022 21:00:02 +0100 |
parents | 5cd9ba96561d |
children |
rev | line source |
---|---|
11666
5cd9ba96561d
patch 8.0.0716: not easy to start Vim cleanly
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1 #!/usr/bin/python |
5cd9ba96561d
patch 8.0.0716: not easy to start Vim cleanly
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2 # |
5cd9ba96561d
patch 8.0.0716: not easy to start Vim cleanly
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
3 # Program that writes a number to stdout repeatedly |
5cd9ba96561d
patch 8.0.0716: not easy to start Vim cleanly
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
4 # |
5cd9ba96561d
patch 8.0.0716: not easy to start Vim cleanly
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
5 # This requires Python 2.6 or later. |
5cd9ba96561d
patch 8.0.0716: not easy to start Vim cleanly
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
6 |
5cd9ba96561d
patch 8.0.0716: not easy to start Vim cleanly
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
7 from __future__ import print_function |
5cd9ba96561d
patch 8.0.0716: not easy to start Vim cleanly
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
8 import sys |
5cd9ba96561d
patch 8.0.0716: not easy to start Vim cleanly
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
9 import time |
5cd9ba96561d
patch 8.0.0716: not easy to start Vim cleanly
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
10 |
5cd9ba96561d
patch 8.0.0716: not easy to start Vim cleanly
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
11 if __name__ == "__main__": |
5cd9ba96561d
patch 8.0.0716: not easy to start Vim cleanly
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
12 |
5cd9ba96561d
patch 8.0.0716: not easy to start Vim cleanly
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
13 done = 0 |
5cd9ba96561d
patch 8.0.0716: not easy to start Vim cleanly
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
14 while done < 10: |
5cd9ba96561d
patch 8.0.0716: not easy to start Vim cleanly
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
15 done = done + 1 |
5cd9ba96561d
patch 8.0.0716: not easy to start Vim cleanly
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
16 print(done) |
5cd9ba96561d
patch 8.0.0716: not easy to start Vim cleanly
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
17 sys.stdout.flush() |
5cd9ba96561d
patch 8.0.0716: not easy to start Vim cleanly
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
18 time.sleep(0.05) # sleep 50 msec |