-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
prettyPrint and use path constant in test
- Loading branch information
Showing
5 changed files
with
10 additions
and
12 deletions.
There are no files selected for viewing
2 changes: 1 addition & 1 deletion
2
packages/Liquid-Core.package/LQPoll.class/class/pathToExport.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
instance creation | ||
pathToExport | ||
^ FileDirectory default fullName, FileDirectory default pathNameDelimiter, 'DataExports' | ||
^ FileDirectory default fullName , FileDirectory default pathNameDelimiter , 'DataExports' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
packages/Liquid-Core.package/LQPoll.class/methodProperties.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 4 additions & 6 deletions
10
packages/Liquid-Tests.package/LQPollTests.class/instance/testCSVExport.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,13 @@ | ||
testing | ||
testCSVExport | ||
| homeDirectory filePath fileStream buffer match | | ||
| filePath fileStream buffer match | | ||
self poll addAnswerSet: self as1. | ||
self poll exportCSV. | ||
|
||
homeDirectory := FileDirectory default fullName. | ||
filePath := homeDirectory , FileDirectory default pathNameDelimiter , 'DataExports' , FileDirectory default pathNameDelimiter , self poll id , '.csv'. | ||
filePath := LQPoll pathToExport , FileDirectory default pathNameDelimiter , self poll id , '.csv'. | ||
fileStream := FileStream fileNamed: filePath. | ||
buffer := fileStream contents. | ||
match := 'Question 1;Question 2; | ||
Q1A1:Q1A2;Q1A2; | ||
'. | ||
self assert: match equals: buffer. | ||
fileStream close. | ||
self assert: match equals: buffer. | ||
fileStream close |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters