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
|
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
|
-
+
-
+
-
+
-
+
-
+
-
+
-
+
|
#!/usr/bin/env csi -script
(use test)
(include "ducttape-lib.scm")
(import ducttape-lib)
(import ansi-escape-sequences)
(use trace)
(set! systype (do-or-die (if (file-exists? "/bin/uname") "/bin/uname" "/usr/bin/uname")))
;(trace skim-cmdline-opts-withargs-by-regex)
;(trace keyword-skim)
;(trace re-match?)
(define (reset-ducttape)
(unsetenv "ducttape_DEBUG_LEVEL")
(unsetenv "DUCTTAPE_DEBUG_LEVEL")
(ducttape-debug-level #f)
(unsetenv "ducttape_DEBUG_PATTERN")
(unsetenv "DUCTTAPE_DEBUG_PATTERN")
(ducttape-debug-regex-filter ".")
(unsetenv "ducttape_LOG_FILE")
(unsetenv "DUCTTAPE_LOG_FILE")
(ducttape-log-file #f)
(unsetenv "ducttape_SILENT_MODE")
(unsetenv "DUCTTAPE_SILENT_MODE")
(ducttape-silent-mode #f)
(unsetenv "ducttape_QUIET_MODE")
(unsetenv "DUCTTAPE_QUIET_MODE")
(ducttape-quiet-mode #f)
(unsetenv "ducttape_COLOR_MODE")
(unsetenv "DUCTTAPE_COLOR_MODE")
(ducttape-color-mode #f)
)
(define (reset-ducttape-with-cmdline-list cmdline-list)
(reset-ducttape)
(command-line-arguments cmdline-list)
(process-command-line)
(ducttape-process-command-line)
)
(define (direct-iputs-test)
(ducttape-color-mode #f)
(ierr "I'm an error")
(iwarn "I'm a warning")
|
110
111
112
113
114
115
116
117
118
119
120
121
122
123
|
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
|
+
+
|
"misc"
(let ((tmpfile (mktemp)))
(test-assert "mktemp: temp file created" (file-exists? tmpfile))
(if (file-exists? tmpfile)
(delete-file tmpfile))
)))
(define (test-systemstuff)
(test-group
"system commands"
(let-values (((ec o e) (isys (find-exe "true"))))
(test-assert "isys: /bin/true should have exit code 0" (equal? ec 0)))
|
333
334
335
336
337
338
339
340
341
342
343
344
345
|
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
|
-
+
+
+
+
+
+
+
+
+
|
(test-argprocessor)
(test-systemstuff)
(test-misc)
(test-wwdate)
) ; end main()
(main)
(sendmail "brandon.j.barclay@intel.com" "6hello subject" "test body")
(sendmail "brandon.j.barclay@intel.com" "6hello subject" "test body" )
;(let* ((image-file "/nfs/site/home/bjbarcla/megatest-logo.png")
; (cid "mtlogo")
; (image-alist (list (cons image-file cid)))
; (body (conc "Hello world<br /><img cid:"cid" alt=\"test image\"><br>bye!")))
; (sendmail "brandon.j.barclay@intel.com" "7hello subject" body use_html: #t images-with-content-id-alist: image-alist)
; (print "sent image mail"))
;(sendmail "bjbarcla" "2hello subject html" "test body<h1>hello</h1><i>italics</i>" use_html: #t)
;(sendmail "bb" "4hello attach subject html" "<h2>hmm</h2>" use_html: #t attach-files-list: '( "/Users/bb/Downloads/wdmycloud-manual-4779-705103.pdf" ) )
;(launch-repl)
(test-exit)
|