Mercurial > vim
comparison src/testdir/test_options.vim @ 26500:8088fa133b93 v8.2.3780
patch 8.2.3780: ":cd" works differently on MS-Windows
Commit: https://github.com/vim/vim/commit/29f3a4591528130fded3fe1d63d74bcf22ab4f6c
Author: Bakudankun <bakudankun@gmail.com>
Date: Sat Dec 11 12:28:08 2021 +0000
patch 8.2.3780: ":cd" works differently on MS-Windows
Problem: ":cd" works differently on MS-Windows.
Solution: Add the 'cdhome' option. (closes https://github.com/vim/vim/issues/9324)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 11 Dec 2021 13:30:03 +0100 |
parents | c59d60e21ef5 |
children | c1702fd7e716 |
comparison
equal
deleted
inserted
replaced
26499:44215e355c69 | 26500:8088fa133b93 |
---|---|
1197 | 1197 |
1198 set scrolljump& | 1198 set scrolljump& |
1199 bw | 1199 bw |
1200 endfunc | 1200 endfunc |
1201 | 1201 |
1202 " Test for the 'cdhome' option | |
1203 func Test_opt_cdhome() | |
1204 if has('unix') || has('vms') | |
1205 throw 'Skipped: only works on non-Unix' | |
1206 endif | |
1207 | |
1208 set cdhome& | |
1209 call assert_equal(0, &cdhome) | |
1210 set cdhome | |
1211 | |
1212 " This paragraph is copied from Test_cd_no_arg(). | |
1213 let path = getcwd() | |
1214 cd | |
1215 call assert_equal($HOME, getcwd()) | |
1216 call assert_notequal(path, getcwd()) | |
1217 exe 'cd ' .. fnameescape(path) | |
1218 call assert_equal(path, getcwd()) | |
1219 | |
1220 set cdhome& | |
1221 endfunc | |
1222 | |
1202 " vim: shiftwidth=2 sts=2 expandtab | 1223 " vim: shiftwidth=2 sts=2 expandtab |