summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorUlf Magnusson <ulfalizer@gmail.com>2012-12-11 11:42:07 +0100
committerUlf Magnusson <ulfalizer@gmail.com>2012-12-11 11:43:19 +0100
commitf7cc4fbcc769b23dad05ad0b8d21ec650ac01037 (patch)
tree8a1f002dda67cc9553e4fa63ba8192558eb204aa /tests
parenta1da0725ef77668acb95e5bdb6774f49e0d00614 (diff)
Add selftests for get_defconfig_filename().
Diffstat (limited to 'tests')
-rw-r--r--tests/Kdefconfig_existent12
-rw-r--r--tests/Kdefconfig_none1
-rw-r--r--tests/Kdefconfig_nonexistent5
-rw-r--r--tests/defconfig_10
-rw-r--r--tests/defconfig_20
5 files changed, 18 insertions, 0 deletions
diff --git a/tests/Kdefconfig_existent b/tests/Kdefconfig_existent
new file mode 100644
index 0000000..895c218
--- /dev/null
+++ b/tests/Kdefconfig_existent
@@ -0,0 +1,12 @@
+# $FOO is "defconfig_2"
+# Should produce "Kconfiglib/tests/defconfig_2"
+
+config FOO
+ option env="BAR"
+
+config A
+ string
+ option defconfig_list
+ default "Kconfiglib/tests/defconfig_1" if y && !n && n
+ default "Kconfiglib/tests/$FOO"
+ default "Kconfiglib/tests/defconfig_1"
diff --git a/tests/Kdefconfig_none b/tests/Kdefconfig_none
new file mode 100644
index 0000000..7259b21
--- /dev/null
+++ b/tests/Kdefconfig_none
@@ -0,0 +1 @@
+# No symbol with "option defconfig_list" defined here
diff --git a/tests/Kdefconfig_nonexistent b/tests/Kdefconfig_nonexistent
new file mode 100644
index 0000000..5b7230f
--- /dev/null
+++ b/tests/Kdefconfig_nonexistent
@@ -0,0 +1,5 @@
+config A
+ string
+ option defconfig_list
+ default "Kconfiglib/tests/non_existent_1"
+ default "Kconfiglib/tests/non_existent_2"
diff --git a/tests/defconfig_1 b/tests/defconfig_1
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/defconfig_1
diff --git a/tests/defconfig_2 b/tests/defconfig_2
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/defconfig_2