From 545706afdcf29b8f584e78275452cca715e284db Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Sun, 27 Jan 2013 01:02:53 -0600 Subject: Rename a number of libraries and executables to avoid conflicts with KDE4 --- kjsembed/tests/test_tdeconfig.js | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100755 kjsembed/tests/test_tdeconfig.js (limited to 'kjsembed/tests/test_tdeconfig.js') diff --git a/kjsembed/tests/test_tdeconfig.js b/kjsembed/tests/test_tdeconfig.js new file mode 100755 index 00000000..519f13fb --- /dev/null +++ b/kjsembed/tests/test_tdeconfig.js @@ -0,0 +1,40 @@ +#!/usr/bin/env kjscmd + +var confName = "jsconfigrc"; +var groupName = "Blah"; + +var conf = new Config(this, confName); + +var grp = conf.group(); + +println( "Group=" + grp ); + +conf.setGroup(groupName); +conf.writeColorEntry("Test Color", "blue"); +conf.writeListEntry("Test Array", ["A Value","B Value", "C Value"]); +conf.writeEntry("Test Text", "this is a test"); +conf.sync(); + +var newData = conf.readListEntry("Test Array"); +var newColor = conf.readColorEntry("Test Color"); +var newText = conf.readEntry("Test Text"); +println("Reread Active Config"); +println("Groups: " + conf.groupList()); +println(newData); +println(newColor); +println(newText); + + +var newConf = new Config(this, confName); +println("Reread Saved Config"); +println("Groups: " + newConf.groupList()); +newConf.setGroup(groupName); + +newData = newConf.readListEntry("Test Array"); +newColor = newConf.readColorEntry("Test Color", "red"); +newText = newConf.readEntry("Test Text", "Wrong Text"); + +println(newData); +println(newColor); +println(newText); + -- cgit v1.2.1