mirror of
https://github.com/sqlite/sqlite.git
synced 2025-07-30 19:03:16 +03:00
Document SQLTester's --print command and add some argument validation to it.
FossilOrigin-Name: ab9c945bb0b4210b3f47e6341f150f8a7cc45f9e4e4c2247e91d2528ed4772a6
This commit is contained in:
@ -574,6 +574,9 @@ class OpenDbCommand extends Command {
|
|||||||
class PrintCommand extends Command {
|
class PrintCommand extends Command {
|
||||||
public PrintCommand(){}
|
public PrintCommand(){}
|
||||||
public void process(SQLTester t, String[] argv, String content) throws Exception{
|
public void process(SQLTester t, String[] argv, String content) throws Exception{
|
||||||
|
if( 1==argv.length && null==content ){
|
||||||
|
Util.badArg(argv[0]," requires at least 1 argument or body content.");
|
||||||
|
}
|
||||||
if( argv.length > 1 ) t.outln("\t",Util.argvToString(argv));
|
if( argv.length > 1 ) t.outln("\t",Util.argvToString(argv));
|
||||||
if( null!=content ) t.outln(content.replaceAll("(?m)^", "\t"));
|
if( null!=content ) t.outln(content.replaceAll("(?m)^", "\t"));
|
||||||
}
|
}
|
||||||
|
@ -244,3 +244,8 @@ respectively. The difference is that column values are appended to the
|
|||||||
result buffer literally, without every enclosing the values in `{...}` or
|
result buffer literally, without every enclosing the values in `{...}` or
|
||||||
`"..."` and without escaping any characters in the column value and comparison
|
`"..."` and without escaping any characters in the column value and comparison
|
||||||
is always an exact strcmp() not a GLOB.
|
is always an exact strcmp() not a GLOB.
|
||||||
|
|
||||||
|
### The --print command
|
||||||
|
|
||||||
|
The --print command emits both its arguments and its body (if any) to
|
||||||
|
stdout, indenting each line of output.
|
||||||
|
@ -18,6 +18,7 @@ select 2;
|
|||||||
--oom
|
--oom
|
||||||
--print These are args to the print command.
|
--print These are args to the print command.
|
||||||
This is from the print command's body.
|
This is from the print command's body.
|
||||||
|
--print
|
||||||
Also from the print command.
|
Also from the print command.
|
||||||
--- also ignored
|
--- also ignored
|
||||||
--testcase first
|
--testcase first
|
||||||
|
16
manifest
16
manifest
@ -1,5 +1,5 @@
|
|||||||
C Rework\show\sSQLTester's\sCommand\sobjects\sare\sdispatched\sand\show\sTestScript\sstores\sits\scommand\sentries.
|
C Document\sSQLTester's\s--print\scommand\sand\sadd\ssome\sargument\svalidation\sto\sit.
|
||||||
D 2023-08-09T11:05:43.390
|
D 2023-08-09T11:10:48.778
|
||||||
F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
|
F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
|
||||||
F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
|
F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
|
||||||
F LICENSE.md df5091916dbb40e6e9686186587125e1b2ff51f022cc334e886c19a0e9982724
|
F LICENSE.md df5091916dbb40e6e9686186587125e1b2ff51f022cc334e886c19a0e9982724
|
||||||
@ -266,10 +266,10 @@ F ext/jni/src/org/sqlite/jni/sqlite3_context.java d26573fc7b309228cb49786e907859
|
|||||||
F ext/jni/src/org/sqlite/jni/sqlite3_stmt.java 78e6d1b95ac600a9475e9db4623f69449322b0c93d1bd4e1616e76ed547ed9fc
|
F ext/jni/src/org/sqlite/jni/sqlite3_stmt.java 78e6d1b95ac600a9475e9db4623f69449322b0c93d1bd4e1616e76ed547ed9fc
|
||||||
F ext/jni/src/org/sqlite/jni/sqlite3_value.java 3d1d4903e267bc0bc81d57d21f5e85978eff389a1a6ed46726dbe75f85e6914a
|
F ext/jni/src/org/sqlite/jni/sqlite3_value.java 3d1d4903e267bc0bc81d57d21f5e85978eff389a1a6ed46726dbe75f85e6914a
|
||||||
F ext/jni/src/org/sqlite/jni/tester/Outer.java 3d9c40f8ed58ec0df05ca160986ea06ec84ec1f338b069cfba9604bbba467a01
|
F ext/jni/src/org/sqlite/jni/tester/Outer.java 3d9c40f8ed58ec0df05ca160986ea06ec84ec1f338b069cfba9604bbba467a01
|
||||||
F ext/jni/src/org/sqlite/jni/tester/SQLTester.java 3ab7c123fcd85932c0c5082419d20d284bd0520755b777bc68d6eb16950d35f9
|
F ext/jni/src/org/sqlite/jni/tester/SQLTester.java 6f2c6679cc3f334058b364de88cf6817ce111514514abdc4fd70c6805c94d824
|
||||||
F ext/jni/src/org/sqlite/jni/tester/TestScript.java 9d9e60cf62eb66d4c3b1567c03b84f5354c72605bf826d4375a6831ff53ba66b
|
F ext/jni/src/org/sqlite/jni/tester/TestScript.java 9d9e60cf62eb66d4c3b1567c03b84f5354c72605bf826d4375a6831ff53ba66b
|
||||||
F ext/jni/src/org/sqlite/jni/tester/test-script-interpreter.md 4a4868c70a68aa1829c1f7659daa78198187199d176778efb86a239c9e58802c
|
F ext/jni/src/org/sqlite/jni/tester/test-script-interpreter.md 55bef0dc8580b90fa13e3728829d5e585b74f50d6ae35b9999bdef5aca0a7cab
|
||||||
F ext/jni/src/tests/000_first.test e4f643e631567a67a21cd9406c13b031580f9703079490480c7bbd1cae421183
|
F ext/jni/src/tests/000_first.test 8bfd5d94fc51586461bdb311ff8df4e772555a29c3babc9e01ad0de324638c1e
|
||||||
F ext/jni/src/tests/010_ignored.test ce2de6742ff1bf98d8976fda0f260ff3d280e8f8c0a99309fb59fcfef2556fcd
|
F ext/jni/src/tests/010_ignored.test ce2de6742ff1bf98d8976fda0f260ff3d280e8f8c0a99309fb59fcfef2556fcd
|
||||||
F ext/lsm1/Makefile a553b728bba6c11201b795188c5708915cc4290f02b7df6ba7e8c4c943fd5cd9
|
F ext/lsm1/Makefile a553b728bba6c11201b795188c5708915cc4290f02b7df6ba7e8c4c943fd5cd9
|
||||||
F ext/lsm1/Makefile.msc f8c878b467232226de288da320e1ac71c131f5ec91e08b21f502303347260013
|
F ext/lsm1/Makefile.msc f8c878b467232226de288da320e1ac71c131f5ec91e08b21f502303347260013
|
||||||
@ -2090,8 +2090,8 @@ F vsixtest/vsixtest.tcl 6a9a6ab600c25a91a7acc6293828957a386a8a93
|
|||||||
F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc
|
F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc
|
||||||
F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e
|
F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e
|
||||||
F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0
|
F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0
|
||||||
P 1d93f93ac9708839e62d2f1b489adc5d47ff290c2d5aef4dd56be4e1e46c81b2
|
P f929f1f7f70181813f74562614f3f2aa29e65590560e3fce1677b8b176e3c6de
|
||||||
R 51876d83c95ab59b5aaaafa4581c6850
|
R e5314da4aee7d756c10ad57fb9cc922a
|
||||||
U stephan
|
U stephan
|
||||||
Z ebf66076159eae05ac15c85362d3eee5
|
Z 8a5463f5ea02a18c2733745eccce2961
|
||||||
# Remove this line to create a well-formed Fossil manifest.
|
# Remove this line to create a well-formed Fossil manifest.
|
||||||
|
@ -1 +1 @@
|
|||||||
f929f1f7f70181813f74562614f3f2aa29e65590560e3fce1677b8b176e3c6de
|
ab9c945bb0b4210b3f47e6341f150f8a7cc45f9e4e4c2247e91d2528ed4772a6
|
Reference in New Issue
Block a user