Skip to content

Commit

Permalink
Fix whitespace issues
Browse files Browse the repository at this point in the history
  • Loading branch information
c42f committed Dec 5, 2020
1 parent 4c8bb11 commit d8e6d4d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
2 changes: 0 additions & 2 deletions src/events.jl
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,11 @@ end
```
"""
function event_loop(callback::Function, plotobj::DisplazWindow, event_list...)

command = hook_command(plotobj.name, event_list...)

open(command, "r") do event_stream
handle_events(callback, event_stream)
end

end

function hook_command(servername, event_list...)
Expand Down
12 changes: 6 additions & 6 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -54,21 +54,21 @@ end
@testset "hook" begin

# first make sure the command is OK:
command = Displaz.hook_command("someserver",
KeyEvent("c")=>Nothing,
KeyEvent("p")=>CursorPosition)
command = Displaz.hook_command("someserver",
KeyEvent("c")=>Nothing,
KeyEvent("p")=>CursorPosition)

@test command == `$(Displaz._displaz_cmd) -server someserver -hook key:c null -hook key:p cursor`

# prepare some fake Displaz outputs:
lines = ["key:c null",
lines = ["key:c null",
"key:p cursor 0 0 0"]
event_stream = IOBuffer()
foreach(l -> write(event_stream, l * "\n"), lines)
seek(event_stream, 0)

# prepare our received events buffer and a callback function:
received = Vector{Any}()
received = Vector{Any}()
callback(x...) = push!(received, x)

# this should plow through our fake output lines and return:
Expand Down

3 comments on commit d8e6d4d

@c42f
Copy link
Owner Author

@c42f c42f commented on d8e6d4d Dec 5, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/25861

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v1.2.1 -m "<description of version>" d8e6d4d1d96ca1ead51543138c046dc749adac28
git push origin v1.2.1

@EvertSchippers
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, @c42f !

Please sign in to comment.