Comments (2)
This would be tricky, possibly we have to redirect stdin & stdout. Redirect os.stdout
to some in-memory buffer or temp file maybe? And similarly, pass out input test data to os.stdin
.
Unfortunately atm I don't have any related resource for it, but if I find anything related to it I'll share here.
Yes, testing flags as well would be good idea.
from asciigraph.
Do you have any idea on how to make the tests for CLI? I am quite new to go, I've done some testing on Rust, and I took a look at asciigraph_test.go
file and understand how it works. But how can I test the for s.Scan() { ... }
block on line 104? Do you have any resource or example I can take as source of inspiration? Would you like to test the flags passed to CLI are doing the right thing?
from asciigraph.
Related Issues (20)
- Axis cross (┼) is in the wrong place at some scales HOT 2
- [Idea] add an option to set the step of series HOT 2
- Hello! Thank you. :)
- Panic when no positive values provided HOT 3
- Reformat Code HOT 5
- Can I plot bar graphs? HOT 1
- NaN numbers HOT 1
- caption not centred HOT 1
- Add option to set fixed range for values
- Print X-Axis values HOT 4
- Confused about the Offset option HOT 2
- Two options: ColorAbove and ColorBelow HOT 1
- Add reference to https://github.com/kroitor/asciichart HOT 1
- PlotMany from command line HOT 2
- CLI: for realtime data stream, clear old graph before plotting new data
- How to install now that `go get` is deprecated HOT 1
- Add legend to graph HOT 1
- is it possible to generate a svg or jpg image? HOT 1
- Panics if data is flat HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from asciigraph.