diff options
Diffstat (limited to 'tests/resources/config')
24 files changed, 109 insertions, 0 deletions
diff --git a/tests/resources/config/.gitconfig b/tests/resources/config/.gitconfig new file mode 100644 index 000000000..fa72bddfc --- /dev/null +++ b/tests/resources/config/.gitconfig @@ -0,0 +1,3 @@ +[core] + repositoryformatversion = 5 + something = 2
\ No newline at end of file diff --git a/tests/resources/config/config-include b/tests/resources/config/config-include new file mode 100644 index 000000000..6b5e79de7 --- /dev/null +++ b/tests/resources/config/config-include @@ -0,0 +1,2 @@ +[include] + path = config-included diff --git a/tests/resources/config/config-included b/tests/resources/config/config-included new file mode 100644 index 000000000..089ca08a7 --- /dev/null +++ b/tests/resources/config/config-included @@ -0,0 +1,2 @@ +[foo "bar"] + baz = huzzah diff --git a/tests/resources/config/config0 b/tests/resources/config/config0 new file mode 100644 index 000000000..85235c501 --- /dev/null +++ b/tests/resources/config/config0 @@ -0,0 +1,7 @@ +# This is a test +; of different comments +[core] + repositoryformatversion = 0 + filemode = true + bare = false + logallrefupdates = true
\ No newline at end of file diff --git a/tests/resources/config/config1 b/tests/resources/config/config1 new file mode 100644 index 000000000..211dc9e7d --- /dev/null +++ b/tests/resources/config/config1 @@ -0,0 +1,5 @@ +# This one checks for case sensitivity +[this "that"] + other = true +[this "That"] + other = yes diff --git a/tests/resources/config/config10 b/tests/resources/config/config10 new file mode 100644 index 000000000..dde17911b --- /dev/null +++ b/tests/resources/config/config10 @@ -0,0 +1 @@ +[empty] diff --git a/tests/resources/config/config11 b/tests/resources/config/config11 new file mode 100644 index 000000000..1d8a74470 --- /dev/null +++ b/tests/resources/config/config11 @@ -0,0 +1,5 @@ +[remote "ab"] + url = git://github.com/libgit2/libgit2 + url = git://git.example.com/libgit2 + + diff --git a/tests/resources/config/config12 b/tests/resources/config/config12 new file mode 100644 index 000000000..b57a81b08 --- /dev/null +++ b/tests/resources/config/config12 @@ -0,0 +1,7 @@ +[some "section"] + test = hi ; comment + other = "hello! \" ; ; ; " ; more test + multi = "hi, this is a ; \ +multiline comment # with ;\n special chars \ +and other stuff !@#" + back = "this is \ba phrase" diff --git a/tests/resources/config/config13 b/tests/resources/config/config13 new file mode 100644 index 000000000..c1e0c5647 --- /dev/null +++ b/tests/resources/config/config13 @@ -0,0 +1,2 @@ +[core] + editor = \"C:/Program Files/Nonsense/bah.exe\" \"--some option\" diff --git a/tests/resources/config/config14 b/tests/resources/config/config14 new file mode 100644 index 000000000..ef2198c45 --- /dev/null +++ b/tests/resources/config/config14 @@ -0,0 +1,4 @@ +[a] + b=c +[d] + e = f diff --git a/tests/resources/config/config15 b/tests/resources/config/config15 new file mode 100644 index 000000000..6d34f817b --- /dev/null +++ b/tests/resources/config/config15 @@ -0,0 +1,3 @@ +[core] + dummy2 = 7 + global = 17 diff --git a/tests/resources/config/config16 b/tests/resources/config/config16 new file mode 100644 index 000000000..f25cdb728 --- /dev/null +++ b/tests/resources/config/config16 @@ -0,0 +1,3 @@ +[core] + dummy2 = 28 + system = 11 diff --git a/tests/resources/config/config17 b/tests/resources/config/config17 new file mode 100644 index 000000000..ca25a86af --- /dev/null +++ b/tests/resources/config/config17 @@ -0,0 +1,3 @@ +[core] + dummy2 = 7 + global = 17
\ No newline at end of file diff --git a/tests/resources/config/config18 b/tests/resources/config/config18 new file mode 100644 index 000000000..cb6fd5ebc --- /dev/null +++ b/tests/resources/config/config18 @@ -0,0 +1,5 @@ +[core] + int32global = 28 + int64global = 9223372036854775803 + boolglobal = true + stringglobal = I'm a global config value!
\ No newline at end of file diff --git a/tests/resources/config/config19 b/tests/resources/config/config19 new file mode 100644 index 000000000..f3ae5a640 --- /dev/null +++ b/tests/resources/config/config19 @@ -0,0 +1,5 @@ +[core] + int32global = -1 + int64global = -2 + boolglobal = false + stringglobal = don't find me!
\ No newline at end of file diff --git a/tests/resources/config/config2 b/tests/resources/config/config2 new file mode 100644 index 000000000..60a389827 --- /dev/null +++ b/tests/resources/config/config2 @@ -0,0 +1,5 @@ +; This one tests for multiline values +[this "That"] + and = one one one \ +two two \ +three three
\ No newline at end of file diff --git a/tests/resources/config/config20 b/tests/resources/config/config20 new file mode 100644 index 000000000..8f0f12c4c --- /dev/null +++ b/tests/resources/config/config20 @@ -0,0 +1,11 @@ +[valid "[subsection]"] + something = a +; we don't allow anything after closing " +[sec "[subsec]/child"] + parent = grand +[sec2 "[subsec2]/child2"] + type = dvcs +[sec3 "escape\"quote"] + vcs = git +[sec4 "escaping\\slash"] + lib = git2 diff --git a/tests/resources/config/config3 b/tests/resources/config/config3 new file mode 100644 index 000000000..44a5e50ea --- /dev/null +++ b/tests/resources/config/config3 @@ -0,0 +1,3 @@ +# A [section.subsection] header is case-insensitive +[section.SuBsection] + var = hello diff --git a/tests/resources/config/config4 b/tests/resources/config/config4 new file mode 100644 index 000000000..9dd40419e --- /dev/null +++ b/tests/resources/config/config4 @@ -0,0 +1,5 @@ +# A variable name on its own is valid +[some.section] + variable +# A variable and '=' is accepted, but it's not considered true + variableeq = diff --git a/tests/resources/config/config5 b/tests/resources/config/config5 new file mode 100644 index 000000000..8ab60ccec --- /dev/null +++ b/tests/resources/config/config5 @@ -0,0 +1,9 @@ +# Test for number suffixes +[number] + simple = 1 + k = 1k + kk = 1K + m = 1m + mm = 1M + g = 1g + gg = 1G diff --git a/tests/resources/config/config6 b/tests/resources/config/config6 new file mode 100644 index 000000000..0f8f90ac9 --- /dev/null +++ b/tests/resources/config/config6 @@ -0,0 +1,5 @@ +[valid "subsection"] + something = true + +[something "else"] + something = false diff --git a/tests/resources/config/config7 b/tests/resources/config/config7 new file mode 100644 index 000000000..6af6fcf25 --- /dev/null +++ b/tests/resources/config/config7 @@ -0,0 +1,5 @@ +[valid "subsection"] + something = a +; we don't allow anything after closing " +[sec "subsec"x] + bleh = blah diff --git a/tests/resources/config/config8 b/tests/resources/config/config8 new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/tests/resources/config/config8 diff --git a/tests/resources/config/config9 b/tests/resources/config/config9 new file mode 100644 index 000000000..fcaac424e --- /dev/null +++ b/tests/resources/config/config9 @@ -0,0 +1,9 @@ +[core] + dummy2 = 42 + verylong = 1 + dummy = 1 + +[remote "ab"] + url = http://example.com/git/ab +[remote "abba"] + url = http://example.com/git/abba |
