Last active
December 21, 2015 18:19
-
-
Save dstj/6346872 to your computer and use it in GitHub Desktop.
This AutoHotKey script facilitates comparing Resharper tests results where one-liner JSON are compared by copy-pasting them, formatting them and comparing them in Notepad++ with the Compare plugin.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; Copy Paste Resharper tests one-liner JSON exptected vs actual output and compare them in Notepad++ | |
; Use by first copying ALL test output in the clipboard, and then press CTRL-ALT-WIN-C | |
^#!c:: | |
; Start Notepad++ | |
ProgramFilesX86 := A_ProgramFiles . (A_PtrSize=8 ? " (x86)" : "") | |
Run %ProgramFilesX86%\Notepad++\notepad++.exe -multiInst -nosession | |
WinWaitActive, new 1 - Notepad++, , 1 | |
Send ^!d | |
Sleep, 100 | |
; Paste in new document | |
Send ^n | |
Sleep, 100 | |
Send ^v | |
; Delete extra stuff | |
Send ^{Home} | |
Send {Down}{Down} | |
Send ^+{End} | |
Send {Del} | |
Send !+{Right 13}!+{Up 2} | |
Send {Del} | |
Send {End}{Backspace} | |
Send {Down}{End}{Backspace} | |
; Extract JSON to compare | |
Send {Home} | |
Send +{End} | |
Send ^x | |
; Format first JSON | |
Send ^a | |
Send ^!+m | |
Sleep, 100 | |
Send ^{Home} | |
Send Expected | |
; Paste second JSON and format | |
Send ^n | |
Sleep, 100 | |
Send ^v | |
Send ^a | |
Send ^!+m | |
Sleep, 100 | |
Send ^{Home} | |
Send Actual | |
; Compare JSON | |
Send !d |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks for merging! I deleted my fork.