summaryrefslogtreecommitdiffstats
path: root/src/util/profile/prof_test1
diff options
context:
space:
mode:
authorGreg Hudson <ghudson@mit.edu>2010-08-25 18:22:53 +0000
committerGreg Hudson <ghudson@mit.edu>2010-08-25 18:22:53 +0000
commit99be0e73e3addded4ee2c0bfeaba2e19ad178fac (patch)
treedf6f1ed6f8e635ba725c4b2d49cdaf0d42bea92d /src/util/profile/prof_test1
parentc21cbf0b415db66cb58afa1da0f7442df45534ac (diff)
downloadkrb5-99be0e73e3addded4ee2c0bfeaba2e19ad178fac.tar.gz
krb5-99be0e73e3addded4ee2c0bfeaba2e19ad178fac.tar.xz
krb5-99be0e73e3addded4ee2c0bfeaba2e19ad178fac.zip
Revise the profile include design so that included files are
syntactically independent of parent files. ticket: 6761 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@24256 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/util/profile/prof_test1')
-rw-r--r--src/util/profile/prof_test132
1 files changed, 32 insertions, 0 deletions
diff --git a/src/util/profile/prof_test1 b/src/util/profile/prof_test1
index dc0867123..27ecbb252 100644
--- a/src/util/profile/prof_test1
+++ b/src/util/profile/prof_test1
@@ -203,9 +203,41 @@ proc test4 {} {
puts "OK: test4: include and includedir directives"
}
+proc test5 {} {
+ global wd verbose
+
+ # Test syntactic independence of included profile files.
+ catch [file delete $wd/testinc.ini]
+ set f [open "$wd/testinc.ini" w]
+ puts $f {[sec1]}
+ puts $f "var = {"
+ puts $f "a = 1"
+ puts $f "include testinc2.ini"
+ puts $f "c = 3"
+ puts $f "}"
+ close $f
+ catch [file delete $wd/testinc2.ini]
+ set f [open "$wd/testinc2.ini" w]
+ puts $f {[sec2]}
+ puts $f "b = 2"
+ close $f
+ set p [profile_init_path $wd/testinc.ini]
+ set a [profile_get_values $p {sec1 var a}]
+ set b [profile_get_values $p {sec2 b}]
+ set c [profile_get_values $p {sec1 var c}]
+ if $verbose { puts "Read values [concat $a $b $c] from profile" }
+ if { $a != 1 || $b != 2 || $c != 3 } {
+ puts stderr, "Error: test5: Wrong results from profile"
+ exit 1
+ }
+
+ puts "OK: test5: syntax independence of included files"
+}
+
test1
test2
test3
test4
+test5
exit 0