This repository was archived by the owner on Sep 11, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 5 files changed +84
-0
lines changed Expand file tree Collapse file tree 5 files changed +84
-0
lines changed Original file line number Diff line number Diff line change
1
+ // a swift module file
2
+
3
+ import Foundation
4
+
5
+ public func printToday( ) {
6
+ let date = Date ( )
7
+ let dateFormatter = DateFormatter ( )
8
+
9
+ dateFormatter. dateStyle = . full
10
+ dateFormatter. timeStyle = . full
11
+
12
+ let dateString = dateFormatter. string ( from: date as Date )
13
+ print ( " Welcome to Swift " )
14
+ print ( " Today is \( dateString) " )
15
+ }
Original file line number Diff line number Diff line change
1
+ // a swift project file
2
+
3
+ import Foundation
4
+ import Today
5
+
6
+ print ( " Hello World " )
7
+ printToday ( ) // func from libToday library
Original file line number Diff line number Diff line change
1
+ // a swift project file
2
+ // include: today.swift
3
+
4
+ import Foundation
5
+
6
+ print ( " Hello World " )
7
+
8
+ printToday ( ) // func from today.swift
Original file line number Diff line number Diff line change
1
+ // a swift project file
2
+
3
+ print ( " Hello World " )
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ echo " Starting Test 1 - helloworld"
4
+ echo
5
+ pushd swiftProjects/ || exit
6
+ echo " Building Test 1 - helloworld"
7
+ echo
8
+ swiftx build helloworld.swift
9
+ echo " Running Test 1 - helloworld"
10
+ echo
11
+ ./helloworld
12
+ popd || exit
13
+ echo " End Test 1 - helloworld"
14
+ echo
15
+ echo " Starting Test 2 - hellomodule"
16
+ echo
17
+ pushd swiftProjects/ || exit
18
+ echo " Building Test 2 - hellomodule"
19
+ echo
20
+ swiftx build hellomodule.swift
21
+ echo " Running Test 2 - hellomodule"
22
+ echo
23
+ ./hellomodule
24
+ popd || exit
25
+ echo " End Test 2 - hellomodule"
26
+ echo
27
+ echo " Starting Test 3 - libToday"
28
+ echo
29
+ pushd swiftModules/ || exit
30
+ echo " Building Test 3 - libToday"
31
+ echo
32
+ printf " today\n1.0.0\n" | swiftx create today.swift -p
33
+ echo " Installing Test 3 - libToday"
34
+ echo
35
+ sudo apt install -y ./libToday_1.0.0.deb
36
+ popd || exit
37
+ echo " End Test 3 - libToday"
38
+ echo
39
+ echo " Starting Test 4 - hellolib"
40
+ echo
41
+ pushd swiftProjects/ || exit
42
+ echo " Building Test 4 - hellolib"
43
+ echo
44
+ swiftx build hellolib.swift
45
+ echo " Running Test 4 - hellolib"
46
+ echo
47
+ ./hellolib
48
+ popd || exit
49
+ echo " End Test 4 - hellolib"
50
+ echo
51
+ echo " **** All Tests Completed ****"
You can’t perform that action at this time.
0 commit comments