forked from pharo-vcs/iceberg
-
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.
- add test for file corruption - fix properties file writing
- Loading branch information
Showing
3 changed files
with
51 additions
and
0 deletions.
There are no files selected for viewing
25 changes: 25 additions & 0 deletions
25
...nvertFormatActionTest.class/instance/testConvertToFiletreeDoesNotCorruptPropertiesFile.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 |
---|---|---|
@@ -0,0 +1,25 @@ | ||
tests | ||
testConvertToFiletreeDoesNotCorruptPropertiesFile | ||
self repository properties fileFormat: IceLibgitTonelWriter. | ||
self repository workingCopy addPackageNamed: self packageName1. | ||
self repository workingCopy | ||
createClass: 'IceGeneratedClassForTesting' | ||
inPackage: self packageName1 asSymbol. | ||
self repository commitWithMessage: 'First commit'. | ||
|
||
self | ||
assert: self repository writerClass | ||
equals: IceLibgitTonelWriter. | ||
|
||
IceConvertFormatAction new | ||
repository: self repository; | ||
branchName: 'migrate-to-filetree'; | ||
mergeWithCurrentBranch: true; | ||
format: #filetree; | ||
execute. | ||
|
||
self | ||
assert: (self repository workingCopy fileSystem / '.properties') contents | ||
equals: '{ | ||
#format : #filetree | ||
}' |
25 changes: 25 additions & 0 deletions
25
...eConvertFormatActionTest.class/instance/testConvertToTonelDoesNotCorruptPropertiesFile.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 |
---|---|---|
@@ -0,0 +1,25 @@ | ||
tests | ||
testConvertToTonelDoesNotCorruptPropertiesFile | ||
self repository properties fileFormat: IceLibgitFiletreeWriter. | ||
self repository workingCopy addPackageNamed: self packageName1. | ||
self repository workingCopy | ||
createClass: 'IceGeneratedClassForTesting' | ||
inPackage: self packageName1 asSymbol. | ||
self repository commitWithMessage: 'First commit'. | ||
|
||
self | ||
assert: self repository writerClass | ||
equals: IceLibgitFiletreeWriter. | ||
|
||
IceConvertFormatAction new | ||
repository: self repository; | ||
branchName: 'migrate-to-filetree'; | ||
mergeWithCurrentBranch: true; | ||
format: #tonel; | ||
execute. | ||
|
||
self | ||
assert: (self repository workingCopy fileSystem / '.properties') contents | ||
equals: '{ | ||
#format : #tonel | ||
}' |
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