@@ -235,3 +235,27 @@ def test_26(self, bash, functions, funcname):
235
235
def test_27 (self , bash , functions , funcname , utf8_ctype ):
236
236
completion = assert_complete (bash , "%s aé/" % funcname , cwd = "_filedir" )
237
237
assert completion == "g"
238
+
239
+ @pytest .mark .parametrize ("funcname" , "f f2" .split ())
240
+ def test_28_dot_1 (self , bash , functions , funcname ):
241
+ """Exclude . and .. when the completion is attempted for '.[TAB]'"""
242
+ completion = assert_complete (bash , r"%s ." % funcname , cwd = "_filedir" )
243
+ assert completion == [".dotfile1" , ".dotfile2" ]
244
+
245
+ @pytest .mark .parametrize ("funcname" , "f f2" .split ())
246
+ def test_28_dot_2 (self , bash , functions , funcname ):
247
+ """Exclude . and .. when the completion is attempted for 'dir/.[TAB]'"""
248
+ completion = assert_complete (bash , r"%s _filedir/." % funcname )
249
+ assert completion == [".dotfile1" , ".dotfile2" ]
250
+
251
+ @pytest .mark .parametrize ("funcname" , "f f2" .split ())
252
+ def test_28_dot_3 (self , bash , functions , funcname ):
253
+ """Include . when the completion is attempted for '..[TAB]'"""
254
+ completion = assert_complete (bash , r"%s .." % funcname , cwd = "_filedir" )
255
+ assert completion == "/"
256
+
257
+ @pytest .mark .parametrize ("funcname" , "f f2" .split ())
258
+ def test_28_dot_4 (self , bash , functions , funcname ):
259
+ """Include . when the completion is attempted for '..[TAB]'"""
260
+ completion = assert_complete (bash , r"%s _filedir/.." % funcname )
261
+ assert completion == "/"
0 commit comments