File: testsuite_printer_include.kbs

package info (click to toggle)
basic256 2.0.99.10-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 6,888 kB
  • sloc: cpp: 17,185; yacc: 4,025; lex: 1,466; java: 1,091; sh: 39; xml: 33; makefile: 20
file content (54 lines) | stat: -rw-r--r-- 1,317 bytes parent folder | download | duplicates (2)
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# testsuite_printer_include section for BASIC256

# Modification History
# date		programmer	description
# 20140529	j.m.reneau	original coding

currentsuite = "printer"

if ostype() = 0 or ostype = 1 or ostype = 2 then
   call s("Printer - PDF setting", getsetting("SYSTEM","Printer/Printer"), "-1")
   
   #
   a$ = getsetting("SYSTEM","Printer/PDFFile")
   call sne("Printer - PDF setting", a$, "")

   printer on
   font "Arial", 20, 50
   for p = 1 to 3
      for l = 0 to 10
         text 0,l*textheight(), "you should NOT SEE this line on page " + p + " line " + l
      next l
      printer page
   next p
   printer cancel

   printer on
   font "Times New Roman", 20, 50
   for p = 1 to 3
      for l = 0 to 10
         b$ = "you should see this line on page " + p + " line " + l + " dot ->"
         text 0,l*textheight(), b$
         circle textwidth(b$)+50, (l+.5)*textheight(), 10
      next l
      if p <> 3 then printer page
   next p
   printer off
   
   print a$
   
   begin case
      case ostype = 0
         system "cmd /c start " + a$
      case ostype = 1
         system "gnome-open " + a$
      case ostype = 2
         system "open " + a$
   end case
   
   call q("Did 3 page pdf open")
   kill a$
   
else
   alert("printing is not supported on the current os type - tests skipped")
endif