replicatest / replica Goto Github PK
View Code? Open in Web Editor NEWGolden tests for command-line interfaces.
License: Other
Golden tests for command-line interfaces.
License: Other
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 ?
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 ?
I've tried to update to 9e36c85 to solve an issue of mine but when building via the flake I got Uncaught error: replica.ipkg:41:3--43:1:Replica.Version not found
. Seems like an idriss error but the CI passes so not sure what s wrong xD
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
Relying on --install
means that we expect that the idris lib directory is writeable.
For good reasons, it isn't the case in nix
(see #30).
It should be sufficient to perform a --build
and copy the build/exec
directory somewhere in the path.
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)
It fails silently when we try to access the golden value.
I am now polishing my golden tests and so ran a sequence of interactive mode.
For each test I get
Do you want to replace the golden value? [N/y]
even though I haven't changed anything to my program, Outputs are similar. Replica should detect it and skip the question ?
NB: is there an option to show a diff of "expected vs actual result" ?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.