mr / ftp-client

Haskell FTP client
7 stars 15 forks source link

Minimal test dependencies #24

Closed ysangkok closed 1 year ago

ysangkok commented 2 years ago

The test dependencies required and imported are actually all simply from hspec. So let's change the cabal file to require what it actually needs.

First, I ran the test on GHC 8.6 (with the minimal Hspec version):

janus@gorm ~/flipstone/ftp-client/ftp-client
 % cabal test --constraint='hspec==2.7.0' -w ghc-8.6.5
Resolving dependencies...
Build profile: -w ghc-8.6.5 -O1
In order, the following will be built (use -v for more details):
 - ftp-client-0.5.1.4 (lib) (configuration changed)
 - ftp-client-0.5.1.4 (test:ftp-client-test) (configuration changed)
Configuring library for ftp-client-0.5.1.4..
Preprocessing library for ftp-client-0.5.1.4..
Building library for ftp-client-0.5.1.4..
Configuring test suite 'ftp-client-test' for ftp-client-0.5.1.4..
Preprocessing test suite 'ftp-client-test' for ftp-client-0.5.1.4..
Building test suite 'ftp-client-test' for ftp-client-0.5.1.4..
[1 of 1] Compiling Main             ( test/test.hs, /home/janus/flipstone/ftp-client/ftp-client/dist-newstyle/build/x86_64-linux/ghc-8.6.5/ftp-client-0.5.1.4/t/ftp-client-test/build/ftp-client-test/ftp-client-test-tmp/Main.o )
Linking /home/janus/flipstone/ftp-client/ftp-client/dist-newstyle/build/x86_64-linux/ghc-8.6.5/ftp-client-0.5.1.4/t/ftp-client-test/build/ftp-client-test/ftp-client-test ...
Running 1 test suites...
Test suite ftp-client-test: RUNNING...
Test suite ftp-client-test: PASS
Test suite logged to:
/home/janus/flipstone/ftp-client/ftp-client/dist-newstyle/build/x86_64-linux/ghc-8.6.5/ftp-client-0.5.1.4/t/ftp-client-test/test/ftp-client-0.5.1.4-ftp-client-test.log
1 of 1 test suites (1 of 1 test cases) passed.

Then, I ran the test on GHC 9.2.1 and with the newest Hspec:

janus@gorm ~/flipstone/ftp-client/ftp-client
 % cabal test --constraint='hspec==2.9.4' -w ghc-9.2.1
Resolving dependencies...
Build profile: -w ghc-9.2.1 -O1
In order, the following will be built (use -v for more details):
 - ftp-client-0.5.1.4 (lib) (configuration changed)
 - ftp-client-0.5.1.4 (test:ftp-client-test) (configuration changed)
Configuring library for ftp-client-0.5.1.4..
Preprocessing library for ftp-client-0.5.1.4..
Building library for ftp-client-0.5.1.4..
Configuring test suite 'ftp-client-test' for ftp-client-0.5.1.4..
Preprocessing test suite 'ftp-client-test' for ftp-client-0.5.1.4..
Building test suite 'ftp-client-test' for ftp-client-0.5.1.4..
Running 1 test suites...
Test suite ftp-client-test: RUNNING...
Test suite ftp-client-test: PASS
Test suite logged to:
/home/janus/flipstone/ftp-client/ftp-client/dist-newstyle/build/x86_64-linux/ghc-9.2.1/ftp-client-0.5.1.4/t/ftp-client-test/test/ftp-client-0.5.1.4-ftp-client-test.log
1 of 1 test suites (1 of 1 test cases) passed.
ysangkok commented 6 months ago

Published this change in ftp-client-0.5.1.5