From 05a74e6e22984d31c61f38b1174882cf19b1f81c Mon Sep 17 00:00:00 2001 From: wxiaoguang Date: Sun, 19 Jun 2022 19:56:22 +0800 Subject: use quoted regexp instead of git fixed-value (#20029) --- modules/git/git_test.go | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'modules/git/git_test.go') diff --git a/modules/git/git_test.go b/modules/git/git_test.go index 061c876cde..c1a9ec351a 100644 --- a/modules/git/git_test.go +++ b/modules/git/git_test.go @@ -78,4 +78,10 @@ func TestGitConfig(t *testing.T) { assert.NoError(t, configUnsetAll("test.key-b", "val-2b")) assert.False(t, gitConfigContains("key-b = val-2b")) + + assert.NoError(t, configSet("test.key-x", "*")) + assert.True(t, gitConfigContains("key-x = *")) + assert.NoError(t, configSetNonExist("test.key-x", "*")) + assert.NoError(t, configUnsetAll("test.key-x", "*")) + assert.False(t, gitConfigContains("key-x = *")) } -- cgit v1.2.3