tests/VDBSimpleDebuggerConsoleApplicationTest.st
author Jan Vrany <jan.vrany@fit.cvut.cz>
Wed, 13 Mar 2019 14:07:49 +0000
changeset 149 adaffe052a41
parent 143 df7f89efd39d
permissions -rw-r--r--
Show log output in simple console This needed because, for example, python errors and stacktrace is reported on log stream, not on output stream.

"
jv:vdb - Visual / VM Debugger
Copyright (C) 2015-now Jan Vrany

This software is licensed under 'Creative Commons Attribution-NonCommercial 4.0 International License'

You may find a full license text in LICENSE.txt or at http://creativecommons.org/licenses/by-nc/4.0/
"
"{ Package: 'jv:vdb/tests' }"

"{ NameSpace: Smalltalk }"

VDBAbstractApplicationTests subclass:#VDBSimpleDebuggerConsoleApplicationTest
	instanceVariableNames:''
	classVariableNames:''
	poolDictionaries:''
	category:'VDB-UI-Console-Tests'
!

!VDBSimpleDebuggerConsoleApplicationTest class methodsFor:'documentation'!

copyright
"
jv:vdb - Visual / VM Debugger
Copyright (C) 2015-now Jan Vrany

This software is licensed under 'Creative Commons Attribution-NonCommercial 4.0 International License'

You may find a full license text in LICENSE.txt or at http://creativecommons.org/licenses/by-nc/4.0/
"
! !

!VDBSimpleDebuggerConsoleApplicationTest methodsFor:'running'!

setUp
    super setUp.

    debugger := GDBDebugger new.
    self assert: debugger isConnected.

    application := VDBSimpleDebuggerConsoleApplication new.
    application debuggerHolder: (ValueHolder with: debugger).
    application open.
    application topView waitUntilVisible.

    "Created: / 16-01-2019 / 13:51:34 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !

!VDBSimpleDebuggerConsoleApplicationTest methodsFor:'tests'!

test_completion_01
    | console consoleI |

    self skipIf: (debugger hasCommand:'complete') not description: 'GDB has support for command line completion'.

    console := application consoleView.
    consoleI := console interactor.

    consoleI type: 'fi'.
    consoleI type: #Tab.
    consoleI type: #Tab.
    self assert: (console list at: 1) asString = '(gdb) fi'.
    self assert: (console list at: console cursorLine) asString = '(gdb) fi'.

    consoleI type: 'l'.
    consoleI type: #Tab.
    self assert: (console list at: console cursorLine) asString = '(gdb) file'.

    "Created: / 16-01-2019 / 13:53:06 / Jan Vrany <jan.vrany@fit.cvut.cz>"
    "Modified: / 21-01-2019 / 09:29:26 / Jan Vrany <jan.vrany@fit.cvut.cz>"
    "Modified: / 25-01-2019 / 22:53:40 / jv"
! !

!VDBSimpleDebuggerConsoleApplicationTest class methodsFor:'documentation'!

version_HG

    ^ '$Changeset: <not expanded> $'
! !