diff options
author | wxiaoguang <wxiaoguang@gmail.com> | 2022-06-19 19:56:22 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-19 12:56:22 +0100 |
commit | 05a74e6e22984d31c61f38b1174882cf19b1f81c (patch) | |
tree | 289315f99a5410a87fb6be39e515602b1925ef15 /modules/git/git_test.go | |
parent | cc42c6488a818499e363935c214d5c4d0aaff554 (diff) | |
download | gitea-05a74e6e22984d31c61f38b1174882cf19b1f81c.tar.gz gitea-05a74e6e22984d31c61f38b1174882cf19b1f81c.zip |
use quoted regexp instead of git fixed-value (#20029)
Diffstat (limited to 'modules/git/git_test.go')
-rw-r--r-- | modules/git/git_test.go | 6 |
1 files changed, 6 insertions, 0 deletions
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 = *")) } |