Skip to content

Commit c54251f

Browse files
committed
Add :office-integrationns lein test selector for tests that require the presense of LibreOffice or OpenOffice.
Update Readme with testing notes.
1 parent fcffd1f commit c54251f

File tree

3 files changed

+31
-2
lines changed

3 files changed

+31
-2
lines changed

README.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@ Lein:
2323
- [Grids](#grids)
2424
- [Templates](#templates)
2525
- [Roadmap](#roadmap)
26+
- [Development](#development)
27+
- [Unit Tests](#unit-tests)
28+
- [Office Integration Tests](#office-integration-tests)
29+
- [All Tests](#all-tests)
2630

2731
## Getting Started
2832

@@ -250,3 +254,26 @@ For example, you can try:
250254
- A way to read in a saved workbook to the `{sheet-name [[cell]]}` format. I'm
251255
not sure what the best way to extract style data is, since there are so many
252256
possible values.
257+
258+
## Development
259+
260+
### Unit Tests
261+
262+
Standard unit tests can be run with the following command:
263+
264+
`$ lein test`
265+
266+
### Office Integration Tests
267+
268+
This test selector is designed to run tests that are dependent on the presence of LibreOffice or OpenOffice.
269+
270+
These tests can be run with:
271+
272+
`$ lein test :office-integrations`
273+
274+
### All Tests
275+
276+
Run all tests with the following command:
277+
278+
`$ lein test :all`
279+

project.clj

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,6 @@
99
[org.apache.poi/poi-ooxml "5.2.0"]
1010
[org.jodconverter/jodconverter-local "4.4.2"]]
1111
:profiles {:test {:dependencies [[org.apache.logging.log4j/log4j-core "2.17.1"]
12-
[org.slf4j/slf4j-nop "1.7.36"]]}})
12+
[org.slf4j/slf4j-nop "1.7.36"]]}}
13+
:test-selectors {:default (complement :office-integrations)
14+
:office-integrations :office-integrations})

test/excel_clj/file_test.clj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
[excel-clj.file :as file]
44
[clojure.java.io :as io]))
55

6-
(deftest convert-to-pdf-test
6+
(deftest ^:office-integrations convert-to-pdf-test
77
(let [input-file (clojure.java.io/resource "uptime-template.xlsx")
88
temp-pdf-file (io/file (file/temp ".pdf"))]
99
(try

0 commit comments

Comments
 (0)