diff options
author | Andrew Tridgell <tridge@samba.org> | 2005-07-12 06:57:25 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:20:10 -0500 |
commit | 26a55c330a8cd79da290b2ad0e15aaf94be6ebcf (patch) | |
tree | 85c23207c8baac99d60163bb3e3089d7e2cabb04 /testprogs/ejs/sprintf.js | |
parent | 102e24761189306fdf6233481ada43e99a56b5e7 (diff) | |
download | samba-26a55c330a8cd79da290b2ad0e15aaf94be6ebcf.tar.gz samba-26a55c330a8cd79da290b2ad0e15aaf94be6ebcf.tar.bz2 samba-26a55c330a8cd79da290b2ad0e15aaf94be6ebcf.zip |
r8355: - added a vsprintf() function
- removed the --outputdir option from provision, as its not used any
more (as ejs knows the real paths)
(This used to be commit abbf9c703c17c2edc2d978dade3619a96c38d0d9)
Diffstat (limited to 'testprogs/ejs/sprintf.js')
-rwxr-xr-x | testprogs/ejs/sprintf.js | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/testprogs/ejs/sprintf.js b/testprogs/ejs/sprintf.js index 34df4f9a42..4d3d9a7555 100755 --- a/testprogs/ejs/sprintf.js +++ b/testprogs/ejs/sprintf.js @@ -11,6 +11,11 @@ function check_result(s, v) 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"); @@ -19,4 +24,6 @@ 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"); |