Skip to content

Commit

Permalink
Move terminal.gd and pty.gd to godot_xterm directory
Browse files Browse the repository at this point in the history
Makes for pretty paths when extending scripts:
`extends "res://addons/godot_xterm/terminal.gd"`
vs.
`extends "res://addons/godot_xterm/nodes/terminal/terminal.gd"`

Currently "res://addons/godot_xterm/pty.gd" is acutally `pty_unix.gd`.
This is okay for now as the PTY node is only supported on Unix
platforms. However, we will need to sort it out when adding Windows
support as part of #25.

Also remove the GDXterm namespace.
  • Loading branch information
lihop committed Jul 25, 2021
1 parent e6db816 commit 9d15420
Show file tree
Hide file tree
Showing 22 changed files with 46 additions and 43 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
tool
extends "../../nodes/terminal/terminal.gd"
extends "../../terminal.gd"

signal exited(exit_code, signum)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
[gd_scene load_steps=4 format=2]

[ext_resource path="res://addons/godot_xterm/editor_plugins/terminal/editor_terminal.gd" type="Script" id=1]
[ext_resource path="res://addons/godot_xterm/nodes/pty/unix/pty_unix.gd" type="Script" id=2]
[ext_resource path="res://addons/godot_xterm/pty.gd" type="Script" id=2]
[ext_resource path="res://addons/godot_xterm/themes/default.tres" type="Theme" id=3]


[node name="Terminal" type="Control"]
anchor_right = 1.0
anchor_bottom = 1.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ tool
extends Control

const EditorTerminal := preload("./editor_terminal.tscn")
const PTY := preload("../../nodes/pty/pty.gd")
const PTY := preload("../../pty.gd")
const TerminalSettings := preload("./settings/terminal_settings.gd")

const SETTINGS_FILE_PATH := "res://.gdxterm/settings.tres"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

[ext_resource path="res://addons/godot_xterm/editor_plugins/terminal/terminal_panel.gd" type="Script" id=1]

[sub_resource type="Image" id=6]
[sub_resource type="Image" id=1]
data = {
"data": PoolByteArray( 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ),
"format": "LumAlpha8",
Expand All @@ -14,7 +14,7 @@ data = {
[sub_resource type="ImageTexture" id=2]
flags = 4
flags = 4
image = SubResource( 6 )
image = SubResource( 1 )
size = Vector2( 16, 16 )

[sub_resource type="StyleBoxTexture" id=3]
Expand All @@ -25,7 +25,7 @@ margin_right = 2.0
margin_top = 2.0
margin_bottom = 2.0

[sub_resource type="Image" id=7]
[sub_resource type="Image" id=4]
data = {
"data": PoolByteArray( 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 224, 224, 224, 0, 224, 224, 224, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 224, 224, 224, 0, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 224, 224, 224, 0, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 224, 224, 224, 0, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 224, 224, 224, 0, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 224, 224, 224, 0, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 224, 224, 224, 0, 224, 224, 224, 0, 224, 224, 224, 0, 224, 224, 224, 0, 224, 224, 224, 0, 224, 224, 224, 0, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 0, 224, 224, 224, 0, 224, 224, 224, 0, 224, 224, 224, 0, 224, 224, 224, 0, 224, 224, 224, 0, 0, 0, 0, 0, 224, 224, 224, 0, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 0, 224, 224, 224, 0, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 0, 0, 0, 0, 0, 224, 224, 224, 0, 224, 224, 224, 0, 224, 224, 224, 0, 224, 224, 224, 0, 224, 224, 224, 0, 224, 224, 224, 0, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 0, 224, 224, 224, 0, 224, 224, 224, 0, 224, 224, 224, 0, 224, 224, 224, 0, 224, 224, 224, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 224, 224, 224, 0, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 224, 224, 224, 0, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 224, 224, 224, 0, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 224, 224, 224, 0, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 224, 224, 224, 0, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 224, 224, 224, 0, 224, 224, 224, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ),
"format": "RGBA8",
Expand All @@ -37,7 +37,7 @@ data = {
[sub_resource type="ImageTexture" id=5]
flags = 0
flags = 0
image = SubResource( 7 )
image = SubResource( 4 )
size = Vector2( 16, 16 )

[node name="Panel" type="Panel"]
Expand Down Expand Up @@ -144,7 +144,6 @@ __meta__ = {
}

[node name="SizeLabelTimer" type="Timer" parent="SizeLabel"]

[connection signal="resized" from="." to="." method="_on_Panel_resized"]
[connection signal="reposition_active_tab_request" from="VBoxContainer/TabbarContainer/Tabs" to="." method="_on_Tabs_reposition_active_tab_request"]
[connection signal="tab_changed" from="VBoxContainer/TabbarContainer/Tabs" to="." method="_on_Tabs_tab_changed"]
Expand Down
5 changes: 0 additions & 5 deletions addons/godot_xterm/namespace.gd

This file was deleted.

2 changes: 1 addition & 1 deletion addons/godot_xterm/nodes/pty/pty.gd
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ extends Node

const LibuvUtils := preload("./libuv_utils.gd")
const Pipe := preload("./pipe.gdns")
const Terminal := preload("../terminal/terminal.gd")
const Terminal := preload("../../terminal.gd")

const DEFAULT_NAME := "xterm-256color"
const DEFAULT_COLS := 80
Expand Down
4 changes: 2 additions & 2 deletions addons/godot_xterm/plugin.gd
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ func _enter_tree():
var asciicast_script = preload("./resources/asciicast.gd")
add_custom_type("Asciicast", "Animation", asciicast_script, null)

var terminal_script = preload("./nodes/terminal/terminal.gd")
var terminal_script = preload("./terminal.gd")
var terminal_icon = preload("./nodes/terminal/terminal_icon.svg")
add_custom_type("Terminal", "Control", terminal_script, terminal_icon)

Expand All @@ -27,7 +27,7 @@ func _enter_tree():
var pty_script
match OS.get_name():
"X11", "Server", "OSX":
pty_script = load("%s/nodes/pty/unix/pty_unix.gd" % base_dir)
pty_script = load("%s/nodes/pty/pty.gd" % base_dir)
add_custom_type("PTY", "Node", pty_script, pty_icon)
var terminal_settings_script = preload("./editor_plugins/terminal/settings/terminal_settings.gd")
add_custom_type("TerminalSettings", "Resource", terminal_settings_script, null)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
# Copyright (c) 2021, Leroy Hopson (MIT License).

tool
extends "../pty.gd"
extends "./nodes/pty/pty.gd"

const PTYUnix = preload("./pty_unix.gdns")
const PTYUnix = preload("./nodes/pty/unix/pty_unix.gdns")

const FALLBACK_FILE = "sh"

Expand Down Expand Up @@ -36,7 +36,7 @@ func _resize(cols: int, rows: int) -> void:


func _fork_thread(args):
var result = preload("./pty_unix.gdns").new().callv("fork", args)
var result = preload("./nodes/pty/unix/pty_unix.gdns").new().callv("fork", args)
return result


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ export var bell_cooldown: float = 0.1
export var blink_on_time: float = 0.6
export var blink_off_time: float = 0.3

var _default_theme: Theme = preload("../../themes/default.tres")
var _viewport: Viewport = preload("./viewport.tscn").instance()
var _default_theme: Theme = preload("./themes/default.tres")
var _viewport: Viewport = preload("./nodes/terminal/viewport.tscn").instance()
var _native_terminal: Control = _viewport.get_node("Terminal")
var _screen := TextureRect.new()

Expand Down
2 changes: 1 addition & 1 deletion examples/asciicast/asciicast.tscn
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[gd_scene load_steps=3 format=2]

[ext_resource path="res://addons/godot_xterm/nodes/terminal/terminal.gd" type="Script" id=1]
[ext_resource path="res://addons/godot_xterm/terminal.gd" type="Script" id=1]
[ext_resource path="res://examples/asciicast/example.cast" type="Animation" id=6]

[node name="Terminal" type="Control"]
Expand Down
6 changes: 5 additions & 1 deletion examples/menu/menu.gd
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ extends Control
# - https://tldp.org/HOWTO/Bash-Prompt-HOWTO/x361.html
# - https://www.youtube.com/watch?v=jTSQlIK_92w

const TPut = preload("res://addons/godot_xterm/util/tput.gd")

# Title generated using command: toilet -f pagga GODOT XTERM
const TITLE = """
░█▀▀░█▀█░█▀▄░█▀█░▀█▀░░░█░█░▀█▀░█▀▀░█▀▄░█▄█\r
Expand Down Expand Up @@ -36,10 +38,12 @@ var row: int
var menu_start_row: int
var offset: int

onready var tput = GDXterm.TPut.new($Terminal)
onready var tput = TPut.new($Terminal)


func _ready():
if not $Terminal.is_connected("key_pressed", self, "_on_Terminal_key_pressed"):
$Terminal.connect("key_pressed", self, "_on_Terminal_key_pressed")
# warning-ignore:return_value_discarded
$Terminal.connect("size_changed", self, "draw_all")
$Terminal.grab_focus()
Expand Down
9 changes: 7 additions & 2 deletions examples/menu/menu.tscn
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[gd_scene load_steps=3 format=2]

[ext_resource path="res://addons/godot_xterm/nodes/terminal/terminal.gd" type="Script" id=1]
[ext_resource path="res://addons/godot_xterm/terminal.gd" type="Script" id=1]
[ext_resource path="res://examples/menu/menu.gd" type="Script" id=2]

[node name="Menu" type="Control"]
Expand All @@ -19,4 +19,9 @@ script = ExtResource( 1 )
__meta__ = {
"_edit_use_anchors_": false
}
[connection signal="key_pressed" from="Terminal" to="." method="_on_Terminal_key_pressed"]
update_mode = 1
copy_on_selection = false
bell_muted = false
bell_cooldown = 0.1
blink_on_time = 0.6
blink_off_time = 0.3
2 changes: 1 addition & 1 deletion examples/socat_terminal/socat_terminal.gd
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
extends "res://addons/godot_xterm/nodes/terminal/terminal.gd"
extends "res://addons/godot_xterm/terminal.gd"

export (String) var exec_path := "bash"
export (String) var socat_path := "socat" # E.g. /usr/bin/socat
Expand Down
1 change: 0 additions & 1 deletion examples/socat_terminal/socat_terminal.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,4 @@ script = ExtResource( 1 )
__meta__ = {
"_edit_use_anchors_": false
}

[connection signal="data_sent" from="." to="." method="_on_Terminal_data_sent"]
2 changes: 1 addition & 1 deletion examples/terminal/terminal.gd
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
extends "res://addons/godot_xterm/nodes/terminal/terminal.gd"
extends "res://addons/godot_xterm/terminal.gd"

onready var pty = $PTY

Expand Down
3 changes: 2 additions & 1 deletion examples/terminal/terminal.tscn
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
[gd_scene load_steps=4 format=2]

[ext_resource path="res://themes/audio/bell.wav" type="AudioStream" id=1]
[ext_resource path="res://addons/godot_xterm/nodes/pty/unix/pty_unix.gd" type="Script" id=2]
[ext_resource path="res://addons/godot_xterm/pty.gd" type="Script" id=2]
[ext_resource path="res://examples/terminal/terminal.gd" type="Script" id=3]


[node name="Terminal" type="Control"]
anchor_right = 1.0
anchor_bottom = 1.0
Expand Down
3 changes: 2 additions & 1 deletion examples/web_console/web_console.tscn
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
[gd_scene load_steps=3 format=2]

[ext_resource path="res://addons/godot_xterm/nodes/terminal/terminal.gd" type="Script" id=2]
[ext_resource path="res://addons/godot_xterm/terminal.gd" type="Script" id=2]
[ext_resource path="res://examples/web_console/web_console.gd" type="Script" id=3]


[node name="WebConsole" type="Control"]
anchor_right = 1.0
anchor_bottom = 1.0
Expand Down
9 changes: 2 additions & 7 deletions project.godot
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,9 @@

config_version=4

_global_script_classes=[ {
"base": "Reference",
"class": "GDXterm",
"language": "GDScript",
"path": "res://addons/godot_xterm/namespace.gd"
} ]
_global_script_classes=[ ]
_global_script_class_icons={
"GDXterm": ""

}

[application]
Expand Down
5 changes: 3 additions & 2 deletions test/platform/unix/unix.test.gd
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
extends "res://addons/gut/test.gd"

const LibuvUtils := preload("res://addons/godot_xterm/nodes/pty/libuv_utils.gd")
var PTY = load("res://addons/godot_xterm/pty.gd")

var pty: GDXterm.PTYUnix
var pty
var helper: Helper


Expand All @@ -14,7 +15,7 @@ func before_all():


func before_each():
pty = GDXterm.PTYUnix.new()
pty = PTY.new()
add_child_autofree(pty)


Expand Down
2 changes: 1 addition & 1 deletion test/scenes/basic.tscn
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[gd_scene load_steps=3 format=2]

[ext_resource path="res://addons/godot_xterm/nodes/terminal/terminal.gd" type="Script" id=2]
[ext_resource path="res://addons/godot_xterm/terminal.gd" type="Script" id=2]
[ext_resource path="res://test/scenes/basic.gd" type="Script" id=3]

[node name="BasicNewTerm" type="Control"]
Expand Down
2 changes: 1 addition & 1 deletion test/scenes/basic_fullscreen.tscn
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[gd_scene load_steps=3 format=2]

[ext_resource path="res://addons/godot_xterm/nodes/terminal/terminal.gd" type="Script" id=1]
[ext_resource path="res://addons/godot_xterm/terminal.gd" type="Script" id=1]
[ext_resource path="res://test/scenes/basic.gd" type="Script" id=2]

[node name="BasicNewTerm" type="Control"]
Expand Down
6 changes: 4 additions & 2 deletions test/unit/terminal.test.gd
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
extends "res://addons/gut/test.gd"

var term: GDXterm.Terminal
const Terminal := preload("res://addons/godot_xterm/terminal.gd")

var term: Terminal


func before_each():
term = GDXterm.Terminal.new()
term = Terminal.new()
term.rect_size = Vector2(400, 200)
add_child_autofree(term)

Expand Down

0 comments on commit 9d15420

Please sign in to comment.