#grep #console #tool #cli #testing

yanked minigrep_243307

A test implementation of simplified cli "grep" tool

0.1.1 Apr 10, 2022
0.1.0 Apr 10, 2022

#253 in #grep

MIT/Apache

5KB
92 lines

Simple usage

Build progect

Run in console:

$ cargo build

Then yo can check for executable in ./target/debug. It is ./target/debug/guessing_game.

Run program

To run program you can use built executable (see previous section) or you can run in console:

  1. Case sensitive search:
$ cargo run <search-string> <filename>
  1. Case insensitive search:

    • for Linux:
    $ CASE_INSENSITIVE=true cargo run <search-string> <filename>
    
    • for Windows:
    PS> $Env:CASE_INSENSITIVE=1; cargo run to poem.txt
    

    then unset CASE_INSENSITIVE environment variable:

    PS> Remove-Item Env:CASE_INSENSITIVE
    

Run tests

Run in console:

$ cargo test

No runtime deps