GithubHelp home page GithubHelp logo

adrieng / test-tools Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mandel/test-tools

0.0 1.0 0.0 11 KB

Simple testing tools for command-line programs

License: Apache License 2.0

Makefile 6.81% OCaml 93.19%

test-tools's Introduction

This project holds two simple utilities that are useful to test command-line tools such as compiler in a convenient way. They are written in pure OCaml and should work on any Unix platform that supports the base OCaml system.

To compile, assuming ocamlbuild is installed, just type make.

Description

All the utilities can deal with multiple files as command-line arguments.

split utility

Usage: split FILE.split cuts FILE.split into multiple parcels, each of them stored within a new file. The N-th parcel is stored into a file in the current directory named

  FILE-N(-LABEL)-SUFFIX.EXT

where SUFFIX and EXT are controlled by command-line arguments and the LABEL part is optional. The contents and labels of each parcel are determined by the contents of file.split according to the following syntax.

  • $ indicates the start of a new parcel.

  • ${ preamble $} indicates that "preamble" is to be copied at the beginning of each subsequent parcel.

  • $$ indicates the start of a new parcel and marks the rest of the line as a comment.

  • $$$word indicates the start of a new parcel and sets the current label to "word".

A known limitation is that it is not currently possible to create a parcel containing the '$' character.

run_test utility

Usage: run_test file.ls runs a command-line program, typically a compiler, on file.ls and checks that the results are as expected. The program to run and its results are specified inside the files using the following syntax.

  run_test:
   [ Good: "compiler1"
     Bad n: "compiler2"
     Bad n "regexp": "compiler3"
     Warning: "compiler4"
     Warning "regexp": "compiler5"  ]

test-tools's People

Contributors

adrieng avatar mandel avatar

Watchers

 avatar

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.