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

Fish spec #1904

Closed
wants to merge 4 commits into from
Closed

Fish spec #1904

wants to merge 4 commits into from

Conversation

bpinto
Copy link
Contributor

@bpinto bpinto commented Jan 19, 2015

@bucaran and I created this plugin called fish-spec to test oh-my-fish internals and plugins.

This is fish-spec running tests on verbose mode:
b547f8ac-9e33-11e4-8825-35c97e9429dd

The aim of this pull request is to discuss the introduction of fish-spec as a dependency to fish-shell tests so that we can start writing tests in an easier way to understand than we currently do (test1.in, test1.out).

P.S.: The only interesting commit to be seen is the last one.

@@ -2,7 +2,7 @@ FROM centos:latest

# Build dependency
RUN yum update -y &&\
yum install -y autoconf automake clang gcc-c++ make ncurses-devel &&\
yum install -y autoconf automake bc clang gcc-c++ make ncurses-devel &&\
Copy link
Contributor Author

Choose a reason for hiding this comment

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

math requires bc package. Check: #1905

@bpinto
Copy link
Contributor Author

bpinto commented Jan 19, 2015

This is the output of the added tests, with and without verbose mode.

image

@ghost
Copy link

ghost commented Jan 19, 2015

Sometimes mistakes happen, and here is how the output looks like then.

533f50d4-9e05-11e4-86a1-6f1d3d10c8bf

@krader1961
Copy link
Contributor

@bpinto and @bucaran: This pull-request is now more than a year old and the https://github.com/bpinto/oh-my-fish/tree/master/plugins/fish-spec link no longer works. Is this still something you'd like to see merged? If yes would you mind opening an enhancement issue that describes the problem and your solution?

@ghost
Copy link

ghost commented Feb 22, 2016

Is this still something you'd like to see merged?

Not me. I am using Fishtape to write my tests now, and not working in fish-spec anymore.

@krader1961
Copy link
Contributor

I'd love to see a framework for fish unit tests in the same vein as Python's unittest2. There are some intriguing ideas in this change but also some problems (like the "it_supports_" naming scheme and redefining expect as a function). Given that no one else has advocated for adopting this in over a year I think it's time to close this and go back to the drawing board.

@krader1961 krader1961 closed this Feb 22, 2016
@ghost
Copy link

ghost commented Feb 22, 2016

@krader1961 Have you had a look at Fishtape? I certainly took inspiration from unittest2.

Tests look like this:

test "math still works"
    5 -eq (math 2 + 3)
end

test "grep still finds"
    dog = (printf "%s\n" $animals | grep dog)
end

test "file exists"
    -f $my_file
end 

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 17, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants