Coder Social home page Coder Social logo

vt100.jl's Introduction

VT100 - A pure julia terminal emulator

Build Status

VT100.jl attempts to implement a small and hackable terminal emulator, mostly intended for automatic verification of Terminal based UIs. The current implementation is very simple and ignores most of the more complicated aspects of terminal emulation, including colors, attributes and Unicode combining characters, but is nevertheless useful for UI validation in regression tests. Support for those features will be added as the need arises

Usage

# Create an Emulator
em = VT100.Emulator()
# Feed the emulator some io
VT100.parse!(em, IOBuffer("\e[37mHello World\n"))
# Create an actual fake terminal
pty = VT100.create_pty()
# [Should pass pty.slave to C library, e.g. ncurses here]
# Now obtain a debug dump of the screen state
buf = IOBuffer()
VT100.dump(buf,devnull,em)
# buf now contains the screen contents of the emulator

For more examples, see the test directory.

Usage for terminal regression tests

The package TerminalRegressionTests.jl has a collection of utilities to simplify writing regression tests for terminal applications.

vt100.jl's People

Contributors

abhijithch avatar dilumaluthge avatar eschnett avatar femtocleaner[bot] avatar jpsamaroo avatar keno avatar kristofferc avatar shashi avatar sjkelly avatar stefankarpinski avatar timholy avatar tkelman avatar yuyichao avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

vt100.jl's Issues

Implement "scrollback buffer" limit?

Currently, ScreenEmulator will accumulate lines in its buffer continuously, without limit. If used for extended processing of terminal input, eventually ScreenEmulator's buffer will use up all available memory. Would it be feasible/acceptable to add a limit to the number of lines stored (by default set to either infinity or some reasonable value)?

Current release is not listed as compatible with latest FixedPointNumbers

The currently-tagged version has an upper-bound on FixedPointNumbers at 0.5.x, but the latest version is 0.6.1. I'm not sure if the right approach is to tag a new release of VT100 at current master, or just update the compatibilty listing in General for the current release (assuming that it is actually compatible of course)

This is causing a conflict with Plots.jl, which requres FixedPointNumbers at 0.6.x.

TagBot trigger issue

This issue is used to trigger TagBot; feel free to unsubscribe.

If you haven't already, you should update your TagBot.yml to include issue comment triggers.
Please see this post on Discourse for instructions and more details.

If you'd like for me to do this for you, comment TagBot fix on this issue.
I'll open a PR within a few hours, please be patient!

Tag new release?

The latest tagged version has a load of deprecation warnings but master doesn't.

Pkg.test() with Julia-0.5 fails

julia> Pkg.test("VT100")
INFO: Testing VT100
Failed test basic/hello
UInt8[0x48,0x65,0x6c,0x6c,0x6f,0x20,0x57,0x6f,0x72,0x6c,0x64,0x0d,0x0a,0x46,0x72
,0x6f,0x6d,0x20,0x56,0x54,0x31,0x30,0x30,0x2e,0x6a,0x6c,0x0d,0x0a]
UInt8[0x48,0x65,0x6c,0x6c,0x6f,0x20,0x57,0x6f,0x72,0x6c,0x64,0x0a,0x46,0x72,0x6f
,0x6d,0x20,0x56,0x54,0x31,0x30,0x30,0x2e,0x6a,0x6c,0x0a]
Hello World
From VT100.jl

Hello World
From VT100.jl

Failed test basic/hello-nocr
UInt8[0x48,0x65,0x6c,0x6c,0x6f,0x20,0x57,0x6f,0x72,0x6c,0x64,0x0d,0x0a,0x20,0x20
,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x46,0x72,0x6f,0x6d,0x20,0x56,0x54
,0x31,0x30,0x30,0x2e,0x6a,0x6c,0x0d,0x0a]
UInt8[0x48,0x65,0x6c,0x6c,0x6f,0x20,0x57,0x6f,0x72,0x6c,0x64,0x0a,0x46,0x72,0x6f
,0x6d,0x20,0x56,0x54,0x31,0x30,0x30,0x2e,0x6a,0x6c,0x0a]
Hello World
           From VT100.jl

Hello World
From VT100.jl

Failed test basic/long
UInt8[0x54,0x68,0x69,0x73,0x20,0x69,0x73,0x20,0x61,0x20,0x76,0x65,0x72,0x79,0x20
,0x76,0x65,0x72,0x79,0x20,0x76,0x65,0x72,0x79,0x20,0x76,0x65,0x72,0x79,0x20,0x76
,0x65,0x72,0x79,0x20,0x76,0x65,0x72,0x79,0x20,0x76,0x65,0x72,0x79,0x20,0x76,0x65
,0x72,0x79,0x20,0x76,0x65,0x72,0x79,0x20,0x76,0x65,0x72,0x79,0x20,0x76,0x65,0x72
,0x79,0x20,0x76,0x65,0x72,0x79,0x20,0x76,0x65,0x72,0x79,0x20,0x76,0x65,0x72,0x79
,0x20,0x0d,0x0a,0x76,0x65,0x72,0x79,0x20,0x6c,0x6f,0x6e,0x67,0x20,0x6c,0x69,0x6e
,0x65,0x20,0x74,0x68,0x61,0x74,0x20,0x74,0x68,0x65,0x20,0x74,0x65,0x72,0x6d,0x69
,0x6e,0x61,0x6c,0x20,0x73,0x68,0x6f,0x75,0x6c,0x64,0x20,0x77,0x72,0x61,0x70,0x21
,0x0d,0x0a]
UInt8[0x54,0x68,0x69,0x73,0x20,0x69,0x73,0x20,0x61,0x20,0x76,0x65,0x72,0x79,0x20
,0x76,0x65,0x72,0x79,0x20,0x76,0x65,0x72,0x79,0x20,0x76,0x65,0x72,0x79,0x20,0x76
,0x65,0x72,0x79,0x20,0x76,0x65,0x72,0x79,0x20,0x76,0x65,0x72,0x79,0x20,0x76,0x65
,0x72,0x79,0x20,0x76,0x65,0x72,0x79,0x20,0x76,0x65,0x72,0x79,0x20,0x76,0x65,0x72
,0x79,0x20,0x76,0x65,0x72,0x79,0x20,0x76,0x65,0x72,0x79,0x20,0x76,0x65,0x72,0x79
,0x20,0x0a,0x76,0x65,0x72,0x79,0x20,0x6c,0x6f,0x6e,0x67,0x20,0x6c,0x69,0x6e,0x65
,0x20,0x74,0x68,0x61,0x74,0x20,0x74,0x68,0x65,0x20,0x74,0x65,0x72,0x6d,0x69,0x6e
,0x61,0x6c,0x20,0x73,0x68,0x6f,0x75,0x6c,0x64,0x20,0x77,0x72,0x61,0x70,0x21,0x0a
]
This is a very very very very very very very very very very very very very very

very long line that the terminal should wrap!

This is a very very very very very very very very very very very very very very

very long line that the terminal should wrap!

Failed test basic/color
UInt8[0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20
,0x5f,0x0d,0x0a,0x20,0x20,0x20,0x5f,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x5f,0x20
,0x5f,0x28,0x5f,0x29,0x5f,0x20,0x20,0x20,0x20,0x20,0x7c,0x20,0x20,0x41,0x20,0x66
,0x72,0x65,0x73,0x68,0x20,0x61,0x70,0x70,0x72,0x6f,0x61,0x63,0x68,0x20,0x74,0x6f
,0x20,0x74,0x65,0x63,0x68,0x6e,0x69,0x63,0x61,0x6c,0x20,0x63,0x6f,0x6d,0x70,0x75
,0x74,0x69,0x6e,0x67,0x0d,0x0a,0x20,0x20,0x28,0x5f,0x29,0x20,0x20,0x20,0x20,0x20
,0x7c,0x20,0x28,0x5f,0x29,0x20,0x28,0x5f,0x29,0x20,0x20,0x20,0x20,0x7c,0x20,0x20
,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x61,0x74,0x69,0x6f,0x6e,0x3a,0x20,0x68
,0x74,0x74,0x70,0x3a,0x2f,0x2f,0x64,0x6f,0x63,0x73,0x2e,0x6a,0x75,0x6c,0x69,0x61
,0x6c,0x61,0x6e,0x67,0x2e,0x6f,0x72,0x67,0x0d,0x0a,0x20,0x20,0x20,0x5f,0x20,0x5f
,0x20,0x20,0x20,0x5f,0x7c,0x20,0x7c,0x5f,0x20,0x20,0x5f,0x5f,0x20,0x5f,0x20,0x20
,0x20,0x7c,0x20,0x20,0x54,0x79,0x70,0x65,0x20,0x22,0x68,0x65,0x6c,0x70,0x28,0x29
,0x22,0x20,0x66,0x6f,0x72,0x20,0x68,0x65,0x6c,0x70,0x2e,0x0d,0x0a,0x20,0x20,0x7c
,0x20,0x7c,0x20,0x7c,0x20,0x7c,0x20,0x7c,0x20,0x7c,0x20,0x7c,0x2f,0x20,0x5f,0x60
,0x20,0x7c,0x20,0x20,0x7c,0x0d,0x0a,0x20,0x20,0x7c,0x20,0x7c,0x20,0x7c,0x5f,0x7c
,0x20,0x7c,0x20,0x7c,0x20,0x7c,0x20,0x28,0x5f,0x7c,0x20,0x7c,0x20,0x20,0x7c,0x20
,0x20,0x56,0x65,0x72,0x73,0x69,0x6f,0x6e,0x20,0x30,0x2e,0x34,0x2e,0x30,0x2d,0x64
,0x65,0x76,0x2b,0x33,0x38,0x32,0x35,0x20,0x28,0x32,0x30,0x31,0x35,0x2d,0x30,0x33
,0x2d,0x31,0x34,0x20,0x32,0x33,0x3a,0x35,0x35,0x20,0x55,0x54,0x43,0x29,0x0d,0x0a
,0x20,0x5f,0x2f,0x20,0x7c,0x5c,0x5f,0x5f,0x27,0x5f,0x7c,0x5f,0x7c,0x5f,0x7c,0x5c
,0x5f,0x5f,0x27,0x5f,0x7c,0x20,0x20,0x7c,0x20,0x20,0x43,0x6f,0x6d,0x6d,0x69,0x74
,0x20,0x38,0x63,0x62,0x30,0x63,0x35,0x30,0x2a,0x20,0x28,0x30,0x20,0x64,0x61,0x79
,0x73,0x20,0x6f,0x6c,0x64,0x20,0x6d,0x61,0x73,0x74,0x65,0x72,0x29,0x0d,0x0a,0x7c
,0x5f,0x5f,0x2f,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20
,0x20,0x20,0x20,0x20,0x20,0x20,0x7c,0x20,0x20,0x78,0x38,0x36,0x5f,0x36,0x34,0x2d
,0x61,0x70,0x70,0x6c,0x65,0x2d,0x64,0x61,0x72,0x77,0x69,0x6e,0x31,0x34,0x2e,0x31
,0x2e,0x30,0x0d,0x0a,0x0d,0x0a]
UInt8[0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20
,0x5f,0x0a,0x20,0x20,0x20,0x5f,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x5f,0x20,0x5f
,0x28,0x5f,0x29,0x5f,0x20,0x20,0x20,0x20,0x20,0x7c,0x20,0x20,0x41,0x20,0x66,0x72
,0x65,0x73,0x68,0x20,0x61,0x70,0x70,0x72,0x6f,0x61,0x63,0x68,0x20,0x74,0x6f,0x20
,0x74,0x65,0x63,0x68,0x6e,0x69,0x63,0x61,0x6c,0x20,0x63,0x6f,0x6d,0x70,0x75,0x74
,0x69,0x6e,0x67,0x0a,0x20,0x20,0x28,0x5f,0x29,0x20,0x20,0x20,0x20,0x20,0x7c,0x20
,0x28,0x5f,0x29,0x20,0x28,0x5f,0x29,0x20,0x20,0x20,0x20,0x7c,0x20,0x20,0x44,0x6f
,0x63,0x75,0x6d,0x65,0x6e,0x74,0x61,0x74,0x69,0x6f,0x6e,0x3a,0x20,0x68,0x74,0x74
,0x70,0x3a,0x2f,0x2f,0x64,0x6f,0x63,0x73,0x2e,0x6a,0x75,0x6c,0x69,0x61,0x6c,0x61
,0x6e,0x67,0x2e,0x6f,0x72,0x67,0x0a,0x20,0x20,0x20,0x5f,0x20,0x5f,0x20,0x20,0x20
,0x5f,0x7c,0x20,0x7c,0x5f,0x20,0x20,0x5f,0x5f,0x20,0x5f,0x20,0x20,0x20,0x7c,0x20
,0x20,0x54,0x79,0x70,0x65,0x20,0x22,0x68,0x65,0x6c,0x70,0x28,0x29,0x22,0x20,0x66
,0x6f,0x72,0x20,0x68,0x65,0x6c,0x70,0x2e,0x0a,0x20,0x20,0x7c,0x20,0x7c,0x20,0x7c
,0x20,0x7c,0x20,0x7c,0x20,0x7c,0x20,0x7c,0x2f,0x20,0x5f,0x60,0x20,0x7c,0x20,0x20
,0x7c,0x0a,0x20,0x20,0x7c,0x20,0x7c,0x20,0x7c,0x5f,0x7c,0x20,0x7c,0x20,0x7c,0x20
,0x7c,0x20,0x28,0x5f,0x7c,0x20,0x7c,0x20,0x20,0x7c,0x20,0x20,0x56,0x65,0x72,0x73
,0x69,0x6f,0x6e,0x20,0x30,0x2e,0x34,0x2e,0x30,0x2d,0x64,0x65,0x76,0x2b,0x33,0x38
,0x32,0x35,0x20,0x28,0x32,0x30,0x31,0x35,0x2d,0x30,0x33,0x2d,0x31,0x34,0x20,0x32
,0x33,0x3a,0x35,0x35,0x20,0x55,0x54,0x43,0x29,0x0a,0x20,0x5f,0x2f,0x20,0x7c,0x5c
,0x5f,0x5f,0x27,0x5f,0x7c,0x5f,0x7c,0x5f,0x7c,0x5c,0x5f,0x5f,0x27,0x5f,0x7c,0x20
,0x20,0x7c,0x20,0x20,0x43,0x6f,0x6d,0x6d,0x69,0x74,0x20,0x38,0x63,0x62,0x30,0x63
,0x35,0x30,0x2a,0x20,0x28,0x30,0x20,0x64,0x61,0x79,0x73,0x20,0x6f,0x6c,0x64,0x20
,0x6d,0x61,0x73,0x74,0x65,0x72,0x29,0x0a,0x7c,0x5f,0x5f,0x2f,0x20,0x20,0x20,0x20
,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x7c
,0x20,0x20,0x78,0x38,0x36,0x5f,0x36,0x34,0x2d,0x61,0x70,0x70,0x6c,0x65,0x2d,0x64
,0x61,0x72,0x77,0x69,0x6e,0x31,0x34,0x2e,0x31,0x2e,0x30,0x0a,0x0a]
               _
   _       _ _(_)_     |  A fresh approach to technical computing
  (_)     | (_) (_)    |  Documentation: http://docs.julialang.org
   _ _   _| |_  __ _   |  Type "help()" for help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 0.4.0-dev+3825 (2015-03-14 23:55 UTC)
 _/ |\__'_|_|_|\__'_|  |  Commit 8cb0c50* (0 days old master)
|__/                   |  x86_64-apple-darwin14.1.0


               _
   _       _ _(_)_     |  A fresh approach to technical computing
  (_)     | (_) (_)    |  Documentation: http://docs.julialang.org
   _ _   _| |_  __ _   |  Type "help()" for help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 0.4.0-dev+3825 (2015-03-14 23:55 UTC)
 _/ |\__'_|_|_|\__'_|  |  Commit 8cb0c50* (0 days old master)
|__/                   |  x86_64-apple-darwin14.1.0


Failed test basic/boserase
UInt8[0x0d,0x0a,0x0d,0x0a,0x0d,0x0a,0x0d,0x0a]
UInt8[0x0a,0x0a,0x0a]









================================[ ERROR: VT100 ]================================


failed process: Process(`'C:\Users\julia\AppData\Local\JuliaPro-0.5.0.1\Julia-0.
5.0\bin\julia' -Cx86-64 '-JC:\Users\julia\AppData\Local\JuliaPro-0.5.0.1\Julia-0
.5.0\lib\julia\sys.dll' --compile=yes --depwarn=yes --check-bounds=yes --code-co
verage=none --color=yes --compilecache=yes 'C:\Users\julia\AppData\Local\JuliaPr
o-0.5.0.1\pkgs-0.5.0.1\v0.5\VT100\test\runtests.jl'`, ProcessExited(5)) [5]

================================================================================

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.