summaryrefslogtreecommitdiffstats
path: root/kjsembed/tests/test_tdeconfig.js
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2013-01-27 01:02:53 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2013-01-27 01:02:53 -0600
commit545706afdcf29b8f584e78275452cca715e284db (patch)
treefdbfaa34f2d633372ba4ab3e46d22cf10f38b40b /kjsembed/tests/test_tdeconfig.js
parent9d4971a2ffb5be9c6fc1b6d6bc74020c37fb2169 (diff)
downloadtdebindings-545706afdcf29b8f584e78275452cca715e284db.tar.gz
tdebindings-545706afdcf29b8f584e78275452cca715e284db.zip
Rename a number of libraries and executables to avoid conflicts with KDE4
Diffstat (limited to 'kjsembed/tests/test_tdeconfig.js')
-rwxr-xr-xkjsembed/tests/test_tdeconfig.js40
1 files changed, 40 insertions, 0 deletions
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);
+