GithubHelp home page GithubHelp logo

replicatest / replica Goto Github PK

View Code? Open in Web Editor NEW
18.0 18.0 3.0 395 KB

Golden tests for command-line interfaces.

License: Other

Makefile 0.95% Idris 77.45% Dhall 19.35% Shell 0.09% Nix 2.16%
golden-testing

replica's People

Contributors

berewt avatar teto avatar xvw avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

xvw teto claymager

replica's Issues

Replica.Minimal doesn't exist anymore ?

I grepped ReplicaTest/replica-dhall for it but couldn't find it (and tests fail).
The doc and examples in this repo still refer to it so I wonder if I am missing anything ?

Uncaught error: Parse error (Lex error at (2, 10) input: 0.2.0

This is my first experience with an idris program and I would like to try it on NixOS (www.nixos.org).
When I try to run the commande in the Makefile, I get an error

idris2 --install replica.ipkg
Uncaught error: Parse error (Lex error at (2, 10) input: 0.2.0

sourcedir = "src"

with

idris2 --version
Idris 2, version 0.3.0

I have removed the line with version from the .ipkg file and that solved that error but triggered anotherone:

(ins)➜ idris2 --install replica.ipkg
1/25: Building Replica.App.FileSystem (src/Replica/App/FileSystem.idr)
Error: Module Data.String not found

src/Replica/Other/String.idr:4:1--4:19
   |
 4 | import Data.String
   | ^^^^^^^^^^^^^^^^^^

In the Idris REPL, if I do :module Data.Strings it seems to work. I wonder if replica is realy idris2 compatible or if it's a missing dependency or sthg else ?

[Feature] Pass multiple json files to replica

I've see a behavior I can't explain when using a glob: the shell expands correctly tests/*.json to tests/hello.json and replica sees the correct filename but it considers it as an option ?

(ins)❯ replica run tests/*.json
Unknown option: tests/hello.json

Usage: replica COMMAND [COMMAND_OPTIONS]

Integration testing for command line interfaces

Commands:
  run   Run tests from a Replica JSON file
  info  Display information about test suites
  set   Set a global configuration for replica commands

Run 'replica help COMMAND' for more information on a command.

if i type the filename directly it works ok

(ins)❯ replica run tests/hello.json 
--------------------------------------------------------------------------------
Running tests...
  ❌  hello: [Unexpected content for output]
      Expected:
      hello, world!
      
      Given:
      Hello, world!
      
--------------------------------------------------------------------------------
Summary:
  ❌  (Failure): 1 / 1

Finally I tried by adjusting the working directory

(ins)❯ replica run -w tests hello.json 
Can't access file hello.json

This is with rev e6abb84

replica set cannot be parsed on ubuntu

Unrelated but puzzled by the following:

replica help set                                                                                                                                                                                                                              

Usage: replica set [OPTIONS] KEY=VALUE

Set a global configuration for replica commands

Options:
  --global, -g  Set a global config value (in `$HOME/.replica.json`)
  --local, -l   Set a local config value (in `./.replica.json`) (default)

Available keys, and description:
  replicaDir (or replica-dir, rDir) where replica stores internal information (default `./.replica`)
  globalDir  (or global-dir, gDir) where replica stores golden values (default `./.replica/tests`)

I think I understand the set syntax yet the following call fails

$  replica set -l globalDir=tests/golden                                                                                                                                                                                                         
Unknown option: globalDir=tests/golden

Usage: replica COMMAND [COMMAND_OPTIONS]

Integration testing for command line interfaces|

Originally posted by @teto in #45 (comment)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.