Add bin and edit workflow
Gitea Actions Demo / Explore-Gitea-Actions (push) Failing after 9s

This commit is contained in:
2026-09-16 13:11:16 -06:00
parent c8ac4fcae5
commit 4cee170d66
17576 changed files with 895740 additions and 2 deletions
@@ -0,0 +1,33 @@
require 'em_test_helper'
class TestLineProtocol < Test::Unit::TestCase
class LineProtocolTestClass
include EM::Protocols::LineProtocol
def lines
@lines ||= []
end
def receive_line(line)
lines << line
end
end
def setup
@proto = LineProtocolTestClass.new
end
def test_simple_split_line
@proto.receive_data("this is")
assert_equal([], @proto.lines)
@proto.receive_data(" a test\n")
assert_equal(["this is a test"], @proto.lines)
end
def test_simple_lines
@proto.receive_data("aaa\nbbb\r\nccc\nddd")
assert_equal(%w(aaa bbb ccc), @proto.lines)
end
end