Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Functional tests #203

Merged
merged 11 commits into from
Sep 29, 2016
Merged

Functional tests #203

merged 11 commits into from
Sep 29, 2016

Conversation

rexim
Copy link
Member

@rexim rexim commented Sep 18, 2016

Description

Since I'm really bad at sbt, my funtests infrastructure implementation probably could be better. Please provide your remarks when you get a chance.

Split out pieces

  • Funtests Windows support
  • REPL funtests support

Checklist

  • Update docs
  • Add/Update Unit Tests

Split #55

@rexim
Copy link
Member Author

rexim commented Sep 18, 2016

Alright, looks funtests hang on Windows. I'm gonna fix that later.

@rexim rexim assigned rexim and unassigned keddelzz Sep 18, 2016
@rexim rexim changed the title Functional tests [WIP] Functional tests Sep 18, 2016
@ForNeVeR
Copy link
Member

looks funtests hang on Windows. I'm gonna fix that later.

Feel free to ask me if you need any help.

@rexim
Copy link
Member Author

rexim commented Sep 19, 2016

Feel free to ask me if you need any help.

@ForNeVeR sure! Thank you!

This was referenced Sep 20, 2016
@rexim
Copy link
Member Author

rexim commented Sep 27, 2016

Alright, it's been already more than a week. I'm gonna submit what I've already done and split out the Windows funtests support.

@rexim
Copy link
Member Author

rexim commented Sep 27, 2016

This is interesting. The result of REPL funtests heavily depends on the terminal implementation on Linux. I observed different results on gnome-terminal and Emacs. It's probably caused by jline. I'm gonna split out REPL funtests support too.

@rexim rexim assigned ForNeVeR and keddelzz and unassigned rexim Sep 27, 2016
@rexim rexim changed the title [WIP] Functional tests Functional tests Sep 27, 2016
@rexim
Copy link
Member Author

rexim commented Sep 27, 2016

@ForNeVeR @keddelzz PR is ready. Please take a look when you get a chance.

class FibFuntest extends FlatSpec with Matchers {
"15 first fibonacci numbers sample" should "print 15 first fibonacci numbers" in {
val expectedOutput = "numbers: [0,1,1,2,3,5,8,13,21,34,55,89,144,233,377]\n"
val actualOutput = "java -jar ./target/scala-2.11/morganey.jar ./docs/samples/fib.mgn".!!
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I recommend to factor this out into a function or a constant, to remove the duplication of "java -jar ./target/scala-2.11/morganey.jar" everywhere.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Copy link
Collaborator

@keddelzz keddelzz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Besides @ForNeVeR's suggested improvement; LGTM 👍

@rexim rexim mentioned this pull request Sep 28, 2016
@rexim
Copy link
Member Author

rexim commented Sep 29, 2016

@ForNeVeR @keddelzz thanks for the review guys!!

@rexim rexim merged commit 26ec2a2 into master Sep 29, 2016
@rexim rexim deleted the functional-tests branch September 29, 2016 08:33
@rexim rexim removed the in progress label Sep 29, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants