File: edit-s-switches.sql

package info (click to toggle)
hsqldb1.8.0 1.8.0.10%2Bdfsg-10
  • links: PTS
  • area: main
  • in suites: buster
  • size: 13,432 kB
  • sloc: java: 75,802; xml: 11,392; sql: 1,556; sh: 847; makefile: 57
file content (32 lines) | stat: -rw-r--r-- 913 bytes parent folder | download | duplicates (12)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
/*
    $Id: edit-s-switches.sql,v 1.2 2004/06/17 02:50:25 unsaved Exp $

    See readme.txt in this directory for how to unit test SqlTool.

    Tests:  Command-line editing with switch command.  With subst. switches.

    HARNESS_METADATA        BEGIN         
    arg                 --noAutoFile
    requireStdoutRegex  (?m)\sMARK A\n.*Current Buffer:\nalpha beta gamma delta$
    requireStdoutRegex  (?m)\sMARK B\n.*Current Buffer:\nalphALTbeta gamma delta$
    requireStdoutRegex  (?m)\sMARK C\n.*Current Buffer:\nGLOBlphALTbetGLOB gGLOBmmGLOB deltGLOB$
    arg                 mem 
    HARNESS_METADATA        END       
*/

/* The blank line after each command moves the command to history without
   executing it. */

alpha beta gamma delta

/* case-sensitive has nothing to do here */
\p MARK A
:s/A /REPL/

/* case-insensitive does work here */
\p MARK B
:s/A /ALT/i

/* global */
\p MARK C
:s/a/GLOB/g