File tree Expand file tree Collapse file tree 2 files changed +21
-0
lines changed
MonticelloTonel-Core.package/TonelReader.class/instance
MonticelloTonel-Tests.package/TonelReaderTest.class/instance Expand file tree Collapse file tree 2 files changed +21
-0
lines changed Original file line number Diff line number Diff line change 22canBeLoaded: aFileReference
33 | fileName |
44 fileName := self fileUtils fileName: aFileReference.
5+
6+ " If the file begins with a `.` then it is an hidden file and should not be loaded."
7+ (fileName beginsWith: ' .' ) ifTrue: [ ^ false ].
8+
59 ^ fileName ~= ' package.st' and : [ fileName endsWith: ' .st' ]
Original file line number Diff line number Diff line change 1+ tests
2+ testHiddenFilesAreIgnored
3+ | snapshot mem reader |
4+
5+ snapshot := self mockSnapshot.
6+ mem := self newMemoryFileSystemSnapshot: snapshot.
7+ (mem / ' MonticelloMocks' / ' ._MCMockClassG.class.st' ) ensureCreateFile; writeStreamDo: [ :s | s << ' This file should be ignored' ].
8+ reader := TonelReader on: mem fileName: ' MonticelloMocks' .
9+ reader loadDefinitions.
10+
11+ self
12+ assert: reader definitions size
13+ equals: snapshot definitions size.
14+
15+ reader definitions sorted
16+ with: snapshot definitions sorted
17+ do: [ :a :b | self assertDefinition: a and : b ]
You can’t perform that action at this time.
0 commit comments