svn commit: samba r25496 - in branches/4.0-python: . testprogs/ejs
jelmer at samba.org
jelmer at samba.org
Wed Oct 3 22:05:42 GMT 2007
Author: jelmer
Date: 2007-10-03 22:05:41 +0000 (Wed, 03 Oct 2007)
New Revision: 25496
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=25496
Log:
Remove obsolete .js files.
Removed:
branches/4.0-python/testprogs/ejs/argv.js
branches/4.0-python/testprogs/ejs/bugs.js
branches/4.0-python/testprogs/ejs/sprintf.js
Modified:
branches/4.0-python/
Changeset:
Property changes on: branches/4.0-python
___________________________________________________________________
Name: bzr:revision-info
...skipped...
Name: bzr:revision-id:v3-trunk0
...skipped...
Deleted: branches/4.0-python/testprogs/ejs/argv.js
===================================================================
--- branches/4.0-python/testprogs/ejs/argv.js 2007-10-03 22:01:25 UTC (rev 25495)
+++ branches/4.0-python/testprogs/ejs/argv.js 2007-10-03 22:05:41 UTC (rev 25496)
@@ -1,14 +0,0 @@
-/*
- demonstrate use of GetOptions
-*/
-
-var options = GetOptions(ARGV,
- "POPT_AUTOHELP",
- "POPT_COMMON_SAMBA",
- "myopt=s",
- "intopt=i",
- "noopt");
-
-println("You called this script with arguments:");
-
-printVars(options);
Deleted: branches/4.0-python/testprogs/ejs/bugs.js
===================================================================
--- branches/4.0-python/testprogs/ejs/bugs.js 2007-10-03 22:01:25 UTC (rev 25495)
+++ branches/4.0-python/testprogs/ejs/bugs.js 2007-10-03 22:05:41 UTC (rev 25496)
@@ -1,155 +0,0 @@
-/*
- demonstrate some bugs in ejs
-
- tridge <appweb at tridgell.net>
-*/
-
-
-/****************************************
-demo a bug in constructing arrays
-fix at http://build.samba.org/build.pl?function=diff;tree=samba4;revision=7124
-status: FIXED
-*****************************************/
-function arraybug() {
- var a;
-
- println("First with 3 elements");
- a = new Array("one", "two", "three");
- printVars(a);
- assert(a.length == 3);
- assert(a[0] == "one");
- assert(a[1] == "two");
- assert(a[2] == "three");
-
- println("with a array length");
- a = new Array(5);
- printVars(a);
- assert(a.length == 5);
-
- println("\nNow with 1 element");
- a = new Array("one");
- printVars(a);
- assert(a.length == 1);
- assert(a[0] == "one");
-
- println("ALL OK");
-}
-
-
-/****************************************
-demo a bug in variable arguments
-fix at http://build.samba.org/build.pl?function=diff;tree=samba4;revision=7085
-status: FIXED
-*****************************************/
-function argsbug() {
- println("we should have been called with 3 arguments");
- assert(arguments.length == 3);
- assert(arguments[0] == "one");
- assert(arguments[1] == "two");
- assert(arguments[2] == "three");
-}
-
-
-/****************************************
-demo a bug in constructing objects
-no fix available yet
-status: SUBMITTED
-*****************************************/
-function MyObj() {
- var o = new Object();
- o.test = 42;
- return o;
-}
-
-function objbug() {
- println("the docs say you should use 'new'");
- var o1 = new MyObj();
- var o2 = MyObj();
- printVars(o1);
- printVars(o2);
- assert(o1.test == 42);
- assert(o2.test == 42);
-}
-
-/*
- demo a expression handling bug
- status: FIXED
-*/
-function exprbug() {
- var a = new Array(10);
- var i;
- for (i=0;i<4;i++) {
- a[1+(i*2)] = i;
- a[2+(i*2)] = i*2;
- }
-}
-
-/****************************************
-demo lack of recursion
-fix in http://build.samba.org/build.pl?function=diff;tree=samba4;revision=7127
-status: FIXED
-*****************************************/
-function fibonacci(n) {
- if (n < 3) {
- return 1;
- }
- return fibonacci(n-1) + fibonacci(n-2);
-}
-
-function recursebug() {
- println("First 10 fibonacci numbers:");
- for (i=0;i<10;i++) {
- println("fibonacci(" + i + ")=" + fibonacci(i));
- }
-}
-
-/****************************************
-demo lack of function variables inside functions
-status: FIXED IN SAMBA
-*****************************************/
-function callback()
-{
- return "testing";
-}
-
-function fnbug(c)
-{
- s = c();
- assert(s == "testing");
-}
-
-/****************************************
-demo incorrect handling of reserved words in strings
-status: SUBMITTED
-*****************************************/
-function reservedbug()
-{
- assert("funct" + "ion" == 'function');
-}
-
-
-/****************************************
-demo incorrect handling of boolean functions
-status: SUBMITTED
-*****************************************/
-function no()
-{
- return false;
-}
-
-function boolbug()
-{
- assert(false == no());
- assert(!no());
-}
-
-
-/* run the tests */
-arraybug();
-argsbug("one", "two", "three");
-recursebug();
-exprbug();
-fnbug(callback);
-reservedbug();
-boolbug();
-objbug();
Deleted: branches/4.0-python/testprogs/ejs/sprintf.js
===================================================================
--- branches/4.0-python/testprogs/ejs/sprintf.js 2007-10-03 22:01:25 UTC (rev 25495)
+++ branches/4.0-python/testprogs/ejs/sprintf.js 2007-10-03 22:05:41 UTC (rev 25496)
@@ -1,31 +0,0 @@
-#!/usr/bin/env smbscript
-/*
- test sprintf function
-*/
-
-string_init(local);
-
-function check_result(s, v)
-{
- if (s != v) {
- println("expected '" + v + "' but got '" + s + "'");
- }
- assert(s == v);
-}
-
-function xprintf()
-{
- return "XX{" + vsprintf(arguments) + "}XX";
-}
-
-check_result(sprintf("%d", 7), "7");
-check_result(sprintf("%04d", 42), "0042");
-check_result(sprintf("my string=%7.2s", "foo%7"), "my string= fo");
-check_result(sprintf("blah=0x%*x", 4, 19), "blah=0x 13");
-check_result(sprintf("blah=0x%0*x", 4, 19), "blah=0x0013");
-check_result(sprintf("blah=%.0f", 1032), "blah=1032");
-check_result(sprintf("%4.2f%%", 72.32), "72.32%");
-
-check_result(xprintf("%4.2f%% and %s", 72.32, "foo"),"XX{72.32% and foo}XX");
-
-println("ALL OK");
More information about the samba-cvs
mailing list