From 56f2ecb06cf24e90861ca48206f2e50ce6b39287 Mon Sep 17 00:00:00 2001 From: Jesse Duffield Date: Tue, 18 Jan 2022 20:57:24 +1100 Subject: [PATCH] another integration test --- .../expected/.git_keep/COMMIT_EDITMSG | 1 + .../expected/.git_keep/FETCH_HEAD | 0 .../expected/.git_keep/HEAD | 1 + .../expected/.git_keep/config | 10 +++ .../expected/.git_keep/description | 1 + .../expected/.git_keep/index | Bin 0 -> 118 bytes .../expected/.git_keep/info/exclude | 7 ++ .../expected/.git_keep/logs/HEAD | 1 + .../expected/.git_keep/logs/refs/heads/master | 1 + .../15/8e9a9c1a9627ea0ef4de8b00a503ed0f80a09e | Bin 0 -> 588 bytes .../18/54ab416d299cda0227d62b9ab0765e5551ef57 | Bin 0 -> 118 bytes .../2c/484c0a45f3726375600319f73978221a74b783 | Bin 0 -> 594 bytes .../7b/9c2149f16c706cea79b03234cb67fde7e9b68f | Bin 0 -> 52 bytes .../8a/af931e5367e5af9d2e2c014800d22190352b14 | Bin 0 -> 608 bytes .../fd/c28832bb15c80146150a24a018088c9df4f8cd | Bin 0 -> 616 bytes .../expected/.git_keep/refs/heads/master | 1 + .../expected/one.txt | 67 ++++++++++++++++++ .../staginWithDiffContextChange/files/one.txt | 63 ++++++++++++++++ .../files/one_new.txt | 67 ++++++++++++++++++ .../recording.json | 1 + .../staginWithDiffContextChange/setup.sh | 14 ++++ .../staginWithDiffContextChange/test.json | 4 ++ 22 files changed, 239 insertions(+) create mode 100644 test/integration/staginWithDiffContextChange/expected/.git_keep/COMMIT_EDITMSG create mode 100644 test/integration/staginWithDiffContextChange/expected/.git_keep/FETCH_HEAD create mode 100644 test/integration/staginWithDiffContextChange/expected/.git_keep/HEAD create mode 100644 test/integration/staginWithDiffContextChange/expected/.git_keep/config create mode 100644 test/integration/staginWithDiffContextChange/expected/.git_keep/description create mode 100644 test/integration/staginWithDiffContextChange/expected/.git_keep/index create mode 100644 test/integration/staginWithDiffContextChange/expected/.git_keep/info/exclude create mode 100644 test/integration/staginWithDiffContextChange/expected/.git_keep/logs/HEAD create mode 100644 test/integration/staginWithDiffContextChange/expected/.git_keep/logs/refs/heads/master create mode 100644 test/integration/staginWithDiffContextChange/expected/.git_keep/objects/15/8e9a9c1a9627ea0ef4de8b00a503ed0f80a09e create mode 100644 test/integration/staginWithDiffContextChange/expected/.git_keep/objects/18/54ab416d299cda0227d62b9ab0765e5551ef57 create mode 100644 test/integration/staginWithDiffContextChange/expected/.git_keep/objects/2c/484c0a45f3726375600319f73978221a74b783 create mode 100644 test/integration/staginWithDiffContextChange/expected/.git_keep/objects/7b/9c2149f16c706cea79b03234cb67fde7e9b68f create mode 100644 test/integration/staginWithDiffContextChange/expected/.git_keep/objects/8a/af931e5367e5af9d2e2c014800d22190352b14 create mode 100644 test/integration/staginWithDiffContextChange/expected/.git_keep/objects/fd/c28832bb15c80146150a24a018088c9df4f8cd create mode 100644 test/integration/staginWithDiffContextChange/expected/.git_keep/refs/heads/master create mode 100644 test/integration/staginWithDiffContextChange/expected/one.txt create mode 100644 test/integration/staginWithDiffContextChange/files/one.txt create mode 100644 test/integration/staginWithDiffContextChange/files/one_new.txt create mode 100644 test/integration/staginWithDiffContextChange/recording.json create mode 100644 test/integration/staginWithDiffContextChange/setup.sh create mode 100644 test/integration/staginWithDiffContextChange/test.json diff --git a/test/integration/staginWithDiffContextChange/expected/.git_keep/COMMIT_EDITMSG b/test/integration/staginWithDiffContextChange/expected/.git_keep/COMMIT_EDITMSG new file mode 100644 index 000000000..e2129701f --- /dev/null +++ b/test/integration/staginWithDiffContextChange/expected/.git_keep/COMMIT_EDITMSG @@ -0,0 +1 @@ +file1 diff --git a/test/integration/staginWithDiffContextChange/expected/.git_keep/FETCH_HEAD b/test/integration/staginWithDiffContextChange/expected/.git_keep/FETCH_HEAD new file mode 100644 index 000000000..e69de29bb diff --git a/test/integration/staginWithDiffContextChange/expected/.git_keep/HEAD b/test/integration/staginWithDiffContextChange/expected/.git_keep/HEAD new file mode 100644 index 000000000..cb089cd89 --- /dev/null +++ b/test/integration/staginWithDiffContextChange/expected/.git_keep/HEAD @@ -0,0 +1 @@ +ref: refs/heads/master diff --git a/test/integration/staginWithDiffContextChange/expected/.git_keep/config b/test/integration/staginWithDiffContextChange/expected/.git_keep/config new file mode 100644 index 000000000..8ae104545 --- /dev/null +++ b/test/integration/staginWithDiffContextChange/expected/.git_keep/config @@ -0,0 +1,10 @@ +[core] + repositoryformatversion = 0 + filemode = true + bare = false + logallrefupdates = true + ignorecase = true + precomposeunicode = true +[user] + email = CI@example.com + name = CI diff --git a/test/integration/staginWithDiffContextChange/expected/.git_keep/description b/test/integration/staginWithDiffContextChange/expected/.git_keep/description new file mode 100644 index 000000000..498b267a8 --- /dev/null +++ b/test/integration/staginWithDiffContextChange/expected/.git_keep/description @@ -0,0 +1 @@ +Unnamed repository; edit this file 'description' to name the repository. diff --git a/test/integration/staginWithDiffContextChange/expected/.git_keep/index b/test/integration/staginWithDiffContextChange/expected/.git_keep/index new file mode 100644 index 0000000000000000000000000000000000000000..ff21c0a01046c393c0944d738040e4d4b4180d3b GIT binary patch literal 118 zcmZ?q402{*U|<4bMj*xk8kZnTbgiE(7o7fd{aigAMh}KdiW5w=MHtxg^HTLnDoTI~ mLxNmgffO5quAzbf*BhrGaf@#rpJpzU6l>u2zx_>-|0MvPcNePw literal 0 HcmV?d00001 diff --git a/test/integration/staginWithDiffContextChange/expected/.git_keep/info/exclude b/test/integration/staginWithDiffContextChange/expected/.git_keep/info/exclude new file mode 100644 index 000000000..8e9f2071f --- /dev/null +++ b/test/integration/staginWithDiffContextChange/expected/.git_keep/info/exclude @@ -0,0 +1,7 @@ +# git ls-files --others --exclude-from=.git/info/exclude +# Lines that start with '#' are comments. +# For a project mostly in C, the following would be a good set of +# exclude patterns (uncomment them if you want to use them): +# *.[oa] +# *~ +.DS_Store diff --git a/test/integration/staginWithDiffContextChange/expected/.git_keep/logs/HEAD b/test/integration/staginWithDiffContextChange/expected/.git_keep/logs/HEAD new file mode 100644 index 000000000..731f404f9 --- /dev/null +++ b/test/integration/staginWithDiffContextChange/expected/.git_keep/logs/HEAD @@ -0,0 +1 @@ +0000000000000000000000000000000000000000 1854ab416d299cda0227d62b9ab0765e5551ef57 CI 1642499804 +1100 commit (initial): file1 diff --git a/test/integration/staginWithDiffContextChange/expected/.git_keep/logs/refs/heads/master b/test/integration/staginWithDiffContextChange/expected/.git_keep/logs/refs/heads/master new file mode 100644 index 000000000..731f404f9 --- /dev/null +++ b/test/integration/staginWithDiffContextChange/expected/.git_keep/logs/refs/heads/master @@ -0,0 +1 @@ +0000000000000000000000000000000000000000 1854ab416d299cda0227d62b9ab0765e5551ef57 CI 1642499804 +1100 commit (initial): file1 diff --git a/test/integration/staginWithDiffContextChange/expected/.git_keep/objects/15/8e9a9c1a9627ea0ef4de8b00a503ed0f80a09e b/test/integration/staginWithDiffContextChange/expected/.git_keep/objects/15/8e9a9c1a9627ea0ef4de8b00a503ed0f80a09e new file mode 100644 index 0000000000000000000000000000000000000000..2c00719b0e5858d36ec8b4f5d17c9076f943d1de GIT binary patch literal 588 zcmV-S0<-;i0ku@IZrd;r?J9l+p&^hA*J_6jHQ=F5;2=N{7xB=UmMEDqMGBN;!!`Wx zy%R;sa)KsHHHr6*ckkXKxsiH9zkd7j{Zqx#9V~a z8DPl^uWO#Qc`mrj63PA?0Zgi0k>F0P!jGo6jgWOnVnULHKJmj{Tb9Sw`quWRso|{Q zHDy%s1I-Ym1Db0?0d0gTNZzXSb%7|RlOg{^0$tyh8J#aM)dNw-V&>XobFHFyY8(EN ztbtDD6!$!}Qr@@XVRg0VQ5R7h!x(|#O=}cr2#v^@kmgwNf%6@&YFam@O&bbyY%6NN ziPdgqgCuZ`J9Oe!B)I1dSNo;v;y8B%1wn%t3!@gnGcWa?FNNfgHOk<|Xajvg1piH7 zwc5P=Y=z9YLC$ZB`5XL4{!xZQc=a%JEwh~jb;evjk;rL}EEZG=i4p`ZLf>|Q1VAXL zdJ}xfK@KSD(TlP}Y;2>g*SmD%r$8oF_<1jktzvF7?Gm4!Xn+Q&K-o!g%5Kp z#icb}1w2fy<@+ZLwwzx%H1aPpty0|32OE9vR^ZPl359nOi~y9u7C=t+4{5rgVG6v2 zP7z0E&&(L03wq;{pyq1rN3`mO88Zi=LMX7_aw#w2aKq}YM}C;XgW=~C-FT|W=LwpzCi z#C+?A8N@8=iKS4`h(Rqy$vF6dHHTPU7EN*(i%Z}BZU-zYJePI0U#g$o9@^>z6xg%K YhzxfkM0eF|((O;~%C;N16V@**0Q-hDWB>pF literal 0 HcmV?d00001 diff --git a/test/integration/staginWithDiffContextChange/expected/.git_keep/objects/2c/484c0a45f3726375600319f73978221a74b783 b/test/integration/staginWithDiffContextChange/expected/.git_keep/objects/2c/484c0a45f3726375600319f73978221a74b783 new file mode 100644 index 0000000000000000000000000000000000000000..342ac1eb8b6d3df04052c894658adf444566cdf4 GIT binary patch literal 594 zcmV-Y0dl z083tZUGuEXbHQbnNcQIlU{dXh1b1o`ew5xeLe?RP2}u(A%n$c%SsqvGJ6oTohO>s( zlu^YGG((UMXs!(fv=OQxd8^X538I)z2L6czy1pwjI$t2w15ww-%$3LDT1D~H7W^ey z1C`1t?s;ydd}zhv>T1uEE}}SwF#^Mz)+o>r3XwA*&9UM`&-c8lY2BDMZ78&3OHunx ztadXSB!Mg3p%b?v!2@r&+AmcX$GIa&2pYtg7_|sqc&Yb%DI^Ehh{27~2I_(c{+qyR zwR!#73Yl?(J-;vJZ}1=ck1`y>tB0X$nMF>KG{ZWJ1yw@gw01sJ--4aaBmi=c3{=Nm z(D%I|0kj!Zy){1NAQB|?=tbHgHa6Gh>%F`2vq96nNAq4T+vybIu9ihyVnmAGAd7Uf zI?oU`7w*ih6qkl|8Ssd?lK($9WiT`_Ff%bx$j?jFE2$`95bc{aM{1h-E50xHx*3)-zvXXO KFb@DJ?hn7{0Tf*T literal 0 HcmV?d00001 diff --git a/test/integration/staginWithDiffContextChange/expected/.git_keep/objects/8a/af931e5367e5af9d2e2c014800d22190352b14 b/test/integration/staginWithDiffContextChange/expected/.git_keep/objects/8a/af931e5367e5af9d2e2c014800d22190352b14 new file mode 100644 index 0000000000000000000000000000000000000000..cb168bb1de05e9b09a915bd1eedd3d3b3365481c GIT binary patch literal 608 zcmV-m0-ybO0ku?7Yuhjo-mCR1gdd6>vY5ffAdrWyC0(I3qZ#yBv1Lb%EE(BO$V&eE z?kr1=)3WVlezNX6-FNqWk~UIr=%+8AzkaA#x?=^Wx=wXjGL_YYh_ceAp%DqfLNwcU zGXpGn;dRZkHqQl@St8l5BY;V@D-ztPRrs&zZ6jnIl9-Srp^yA<+m_{VwZ5_ZG&P(x zyrzsQexMnGbU<@$D4>l{1<6~LzAX^NbTZ_>l0ertWk%-HLuTti{so86a)=oER0$NPrTH7z7&!})+mD;qYdza2>zSE zYPEU!)(V+%gFU}5<}>(@{YM!N;nl;?rOYCym^4G4#eym!aoV6_N~BTv{Qdf87?Z%x zi*DHDPInT(<{mlQ>LT=guSfuG2UTyCFFA+?MLl{}c8HD5w)J{1ul%eygtceh%V+zV zLfmm##1%%Q=nb<-H>>jyVRPoz+)8n7U{?W;oTL2vIfN~zH$IMBj!df*H}u{{pSl&e zI7&j#oCG5PWv~UXC;NwOx}jkTysAzS*Up}qF+dme$|XU~)!L6})eSRd4nl=cV7=v1 zp2OjW)mx8To5F+P#}wnMiYxRA-Z2Y>8Y1-dHHUklSjkT(m-Zmk&ZoLG3BfMqj~Bu! u=j5C$*^XaG>JJaf3C}|RwEe#~Xdtoo&p(SJ5BrwKPnPWsj?Ql=Vg5{<;4gUq literal 0 HcmV?d00001 diff --git a/test/integration/staginWithDiffContextChange/expected/.git_keep/objects/fd/c28832bb15c80146150a24a018088c9df4f8cd b/test/integration/staginWithDiffContextChange/expected/.git_keep/objects/fd/c28832bb15c80146150a24a018088c9df4f8cd new file mode 100644 index 0000000000000000000000000000000000000000..af8771ae43163736691100029b34eb18d186cda2 GIT binary patch literal 616 zcmV-u0+;=G0ku?7Yuhjo-mCR1gdd6>vV<|lAdrWyC0(I3qZ#yBv1Lb%EE(BO$V&eE z?kr2T)3WVld5Z75yYKG%ByFYM(obK$e*RFhWY2O=b(QF%U@EN$5k;v@O(PP7xu|!| zb_Uq|g;y0%n=BJtrgO=DodBGd`+Sa-T800b-qb=?A&Ci@&*>vS-Zn*XT5oPFKTQm0 zHLob6iXUl;Annmi8wzMGR8F!+C2t!Y5>q`8wNuO-J(6n`#Zyc8 zL$Vr}iYeASHd5X-;(mQm^Pux6j$w_!@VYSyGz21YCZs-9p5>A%A#vNFWJ)Aa`279)XBd;f z?u%~NE%^2+auOIUjroqTq# zDa0L@MO_#3xW_C6>I==x8oCF@Y CeJHm8 literal 0 HcmV?d00001 diff --git a/test/integration/staginWithDiffContextChange/expected/.git_keep/refs/heads/master b/test/integration/staginWithDiffContextChange/expected/.git_keep/refs/heads/master new file mode 100644 index 000000000..c5cccb127 --- /dev/null +++ b/test/integration/staginWithDiffContextChange/expected/.git_keep/refs/heads/master @@ -0,0 +1 @@ +1854ab416d299cda0227d62b9ab0765e5551ef57 diff --git a/test/integration/staginWithDiffContextChange/expected/one.txt b/test/integration/staginWithDiffContextChange/expected/one.txt new file mode 100644 index 000000000..c3323cfc9 --- /dev/null +++ b/test/integration/staginWithDiffContextChange/expected/one.txt @@ -0,0 +1,67 @@ +package oscommands + +import ( + "github.com/jesseduffield/lazygit/pkg/common" + "github.com/jesseduffield/lazygit/pkg/utils" +) + +// NewDummyOSCommand creates a new dummy OSCommand for testing +func NewDummyOSCommand() *OSCommand { + osCmd := NewOSCommand(utils.NewDummyCommon(), dummyPlatform, NewNullGuiIO(utils.NewDummyLog())) + + return osCmd +} + +type OSCommandDeps struct { + Common *common.Common + Platform *Platform + GetenvFn func(string) string + RemoveFileFn func(string) error + Cmd *CmdObjBuilder +} + +func NewDummyOSCommandWithDeps(deps OSCommandDeps) *OSCommand { + if deps.Cmd == nil { + panic("WHAT") + } + common := deps.Common + if common == nil { + common = utils.NewDummyCommon() + } + + platform := deps.Platform + if platform == nil { + platform = dummyPlatform + } + + return &OSCommand{ + Common: common, + Platform: platform, + getenvFn: deps.GetenvFn, + removeFileFn: deps.RemoveFileFn, + guiIO: NewNullGuiIO(utils.NewDummyLog()), + Cmd: deps.Cmd, + } +} + +func NewDummyCmdObjBuilder(runner ICmdObjRunner) *CmdObjBuilder { + return &CmdObjBuilder{ + runner: runner, + platform: dummyPlatform, + } +} + +var dummyPlatform = &Platform{ + OS: "darwin", + Shell: "bash", + ShellArg: "-c", + OpenCommand: "open {{filename}}", + OpenLinkCommand: "open {{link}}", +} + +func NewDummyOSCommandWithRunner(runner *FakeCmdObjRunner) *OSCommand { + osCommand := NewOSCommand(utils.NewDummyCommon(), dummyPlatform, NewNullGuiIO(utils.NewDummyLog())) + osCommand.Cmd = NewDummyCmdObjBuilder(runner) + + return osCommand +} diff --git a/test/integration/staginWithDiffContextChange/files/one.txt b/test/integration/staginWithDiffContextChange/files/one.txt new file mode 100644 index 000000000..158e9a9c1 --- /dev/null +++ b/test/integration/staginWithDiffContextChange/files/one.txt @@ -0,0 +1,63 @@ +package oscommands + +import ( + "github.com/jesseduffield/lazygit/pkg/common" + "github.com/jesseduffield/lazygit/pkg/utils" +) + +// NewDummyOSCommand creates a new dummy OSCommand for testing +func NewDummyOSCommand() *OSCommand { + osCmd := NewOSCommand(utils.NewDummyCommon(), dummyPlatform, NewNullGuiIO(utils.NewDummyLog())) + + return osCmd +} + +type OSCommandDeps struct { + Common *common.Common + Platform *Platform + GetenvFn func(string) string + RemoveFileFn func(string) error + Cmd *CmdObjBuilder +} + +func NewDummyOSCommandWithDeps(deps OSCommandDeps) *OSCommand { + common := deps.Common + if common == nil { + common = utils.NewDummyCommon() + } + + platform := deps.Platform + if platform == nil { + platform = dummyPlatform + } + + return &OSCommand{ + Common: common, + Platform: platform, + getenvFn: deps.GetenvFn, + removeFileFn: deps.RemoveFileFn, + guiIO: NewNullGuiIO(utils.NewDummyLog()), + } +} + +func NewDummyCmdObjBuilder(runner ICmdObjRunner) *CmdObjBuilder { + return &CmdObjBuilder{ + runner: runner, + platform: dummyPlatform, + } +} + +var dummyPlatform = &Platform{ + OS: "darwin", + Shell: "bash", + ShellArg: "-c", + OpenCommand: "open {{filename}}", + OpenLinkCommand: "open {{link}}", +} + +func NewDummyOSCommandWithRunner(runner *FakeCmdObjRunner) *OSCommand { + osCommand := NewOSCommand(utils.NewDummyCommon(), dummyPlatform, NewNullGuiIO(utils.NewDummyLog())) + osCommand.Cmd = NewDummyCmdObjBuilder(runner) + + return osCommand +} diff --git a/test/integration/staginWithDiffContextChange/files/one_new.txt b/test/integration/staginWithDiffContextChange/files/one_new.txt new file mode 100644 index 000000000..c3323cfc9 --- /dev/null +++ b/test/integration/staginWithDiffContextChange/files/one_new.txt @@ -0,0 +1,67 @@ +package oscommands + +import ( + "github.com/jesseduffield/lazygit/pkg/common" + "github.com/jesseduffield/lazygit/pkg/utils" +) + +// NewDummyOSCommand creates a new dummy OSCommand for testing +func NewDummyOSCommand() *OSCommand { + osCmd := NewOSCommand(utils.NewDummyCommon(), dummyPlatform, NewNullGuiIO(utils.NewDummyLog())) + + return osCmd +} + +type OSCommandDeps struct { + Common *common.Common + Platform *Platform + GetenvFn func(string) string + RemoveFileFn func(string) error + Cmd *CmdObjBuilder +} + +func NewDummyOSCommandWithDeps(deps OSCommandDeps) *OSCommand { + if deps.Cmd == nil { + panic("WHAT") + } + common := deps.Common + if common == nil { + common = utils.NewDummyCommon() + } + + platform := deps.Platform + if platform == nil { + platform = dummyPlatform + } + + return &OSCommand{ + Common: common, + Platform: platform, + getenvFn: deps.GetenvFn, + removeFileFn: deps.RemoveFileFn, + guiIO: NewNullGuiIO(utils.NewDummyLog()), + Cmd: deps.Cmd, + } +} + +func NewDummyCmdObjBuilder(runner ICmdObjRunner) *CmdObjBuilder { + return &CmdObjBuilder{ + runner: runner, + platform: dummyPlatform, + } +} + +var dummyPlatform = &Platform{ + OS: "darwin", + Shell: "bash", + ShellArg: "-c", + OpenCommand: "open {{filename}}", + OpenLinkCommand: "open {{link}}", +} + +func NewDummyOSCommandWithRunner(runner *FakeCmdObjRunner) *OSCommand { + osCommand := NewOSCommand(utils.NewDummyCommon(), dummyPlatform, NewNullGuiIO(utils.NewDummyLog())) + osCommand.Cmd = NewDummyCmdObjBuilder(runner) + + return osCommand +} diff --git a/test/integration/staginWithDiffContextChange/recording.json b/test/integration/staginWithDiffContextChange/recording.json new file mode 100644 index 000000000..5bce04f41 --- /dev/null +++ b/test/integration/staginWithDiffContextChange/recording.json @@ -0,0 +1 @@ +{"KeyEvents":[{"Timestamp":1395,"Mod":0,"Key":13,"Ch":13},{"Timestamp":3036,"Mod":0,"Key":256,"Ch":125},{"Timestamp":3283,"Mod":0,"Key":256,"Ch":125},{"Timestamp":3483,"Mod":0,"Key":256,"Ch":125},{"Timestamp":3996,"Mod":0,"Key":256,"Ch":32},{"Timestamp":4629,"Mod":0,"Key":258,"Ch":0},{"Timestamp":5004,"Mod":0,"Key":258,"Ch":0},{"Timestamp":5067,"Mod":0,"Key":256,"Ch":118},{"Timestamp":5547,"Mod":0,"Key":257,"Ch":0},{"Timestamp":5867,"Mod":0,"Key":256,"Ch":118},{"Timestamp":6492,"Mod":0,"Key":256,"Ch":118},{"Timestamp":6628,"Mod":0,"Key":257,"Ch":0},{"Timestamp":6762,"Mod":0,"Key":257,"Ch":0},{"Timestamp":7779,"Mod":0,"Key":256,"Ch":125},{"Timestamp":8179,"Mod":0,"Key":256,"Ch":125},{"Timestamp":8723,"Mod":0,"Key":256,"Ch":32},{"Timestamp":9531,"Mod":0,"Key":259,"Ch":0},{"Timestamp":10170,"Mod":0,"Key":258,"Ch":0},{"Timestamp":10379,"Mod":0,"Key":258,"Ch":0},{"Timestamp":10500,"Mod":0,"Key":258,"Ch":0},{"Timestamp":10833,"Mod":0,"Key":258,"Ch":0},{"Timestamp":10849,"Mod":0,"Key":258,"Ch":0},{"Timestamp":10865,"Mod":0,"Key":258,"Ch":0},{"Timestamp":10881,"Mod":0,"Key":258,"Ch":0},{"Timestamp":10898,"Mod":0,"Key":258,"Ch":0},{"Timestamp":10915,"Mod":0,"Key":258,"Ch":0},{"Timestamp":10931,"Mod":0,"Key":258,"Ch":0},{"Timestamp":10947,"Mod":0,"Key":258,"Ch":0},{"Timestamp":10964,"Mod":0,"Key":258,"Ch":0},{"Timestamp":11156,"Mod":0,"Key":258,"Ch":0},{"Timestamp":11308,"Mod":0,"Key":258,"Ch":0},{"Timestamp":11435,"Mod":0,"Key":256,"Ch":118},{"Timestamp":11571,"Mod":0,"Key":258,"Ch":0},{"Timestamp":11700,"Mod":0,"Key":258,"Ch":0},{"Timestamp":11828,"Mod":0,"Key":258,"Ch":0},{"Timestamp":11963,"Mod":0,"Key":258,"Ch":0},{"Timestamp":12083,"Mod":0,"Key":258,"Ch":0},{"Timestamp":12603,"Mod":0,"Key":256,"Ch":32},{"Timestamp":13051,"Mod":0,"Key":9,"Ch":9},{"Timestamp":14820,"Mod":0,"Key":256,"Ch":118},{"Timestamp":15028,"Mod":0,"Key":258,"Ch":0},{"Timestamp":15139,"Mod":0,"Key":258,"Ch":0},{"Timestamp":15266,"Mod":0,"Key":258,"Ch":0},{"Timestamp":15387,"Mod":0,"Key":258,"Ch":0},{"Timestamp":15500,"Mod":0,"Key":258,"Ch":0},{"Timestamp":16266,"Mod":0,"Key":256,"Ch":125},{"Timestamp":16483,"Mod":0,"Key":256,"Ch":125},{"Timestamp":16747,"Mod":0,"Key":256,"Ch":125},{"Timestamp":17412,"Mod":0,"Key":256,"Ch":32},{"Timestamp":19124,"Mod":0,"Key":256,"Ch":113}],"ResizeEvents":[{"Timestamp":0,"Width":272,"Height":74}]} \ No newline at end of file diff --git a/test/integration/staginWithDiffContextChange/setup.sh b/test/integration/staginWithDiffContextChange/setup.sh new file mode 100644 index 000000000..7cfacd06f --- /dev/null +++ b/test/integration/staginWithDiffContextChange/setup.sh @@ -0,0 +1,14 @@ +#!/bin/sh + +cd $1 + +git init + +git config user.email "CI@example.com" +git config user.name "CI" + +cp ../files/one.txt one.txt +git add . +git commit -am file1 + +cp ../files/one_new.txt one.txt diff --git a/test/integration/staginWithDiffContextChange/test.json b/test/integration/staginWithDiffContextChange/test.json new file mode 100644 index 000000000..0351e0ec9 --- /dev/null +++ b/test/integration/staginWithDiffContextChange/test.json @@ -0,0 +1,4 @@ +{ + "description": "Staging a file and also changing the diff context", + "speed": 20 +}