-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
126 changed files
with
6,320 additions
and
852 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -117,3 +117,6 @@ indent_size = 4 | |
indent_style = space | ||
indent_size = 4 | ||
tab_width = 4 | ||
|
||
[*.md] | ||
trim_trailing_whitespace = false |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
namespace NexusMods.Archives.Nx.Tests; | ||
|
||
/// <summary> | ||
/// Provides access to test assets. | ||
/// </summary> | ||
public static class Assets | ||
{ | ||
private static string TestRunnerDirectory => AppContext.BaseDirectory; | ||
|
||
/// <summary> | ||
/// This folder stores all tests for repacking .nx archives. | ||
/// </summary> | ||
public static class Repacks | ||
{ | ||
public static class Unit | ||
{ | ||
/// <summary> | ||
/// We've changed a file in a SOLID block. The block should be repacked. | ||
/// </summary> | ||
public static class ChangeInSolidBlock | ||
{ | ||
public static string New => Path.Combine(TestRunnerDirectory, "Assets/Repacks/Unit/Change-In-Solid-Block/New"); | ||
public static string Original => Path.Combine(TestRunnerDirectory, "Assets/Repacks/Unit/Change-In-Solid-Block/Original"); | ||
} | ||
|
||
/// <summary> | ||
/// A chunked file is left unchanged. It should be reused. | ||
/// Run this test with chunk size of 32K. | ||
/// </summary> | ||
public static class ChunkedFileUnchanged | ||
{ | ||
public static string Original => Path.Combine(TestRunnerDirectory, "Assets/Repacks/Unit/Chunked-File-Unchanged/Original"); | ||
} | ||
} | ||
|
||
public static class Integration | ||
{ | ||
/// <summary> | ||
/// We've changed a file in a SOLID block. The block should be repacked. | ||
/// But there's also another block that's unchanged. | ||
/// </summary> | ||
public static class ChangeInSolidBlockWithAnotherUnchangedBlock | ||
{ | ||
public static string New => Path.Combine(TestRunnerDirectory, "Assets/Repacks/Integration/Change-In-Solid-Block-With-Another-Unchanged-Block/New"); | ||
public static string Original => Path.Combine(TestRunnerDirectory, "Assets/Repacks/Integration/Change-In-Solid-Block-With-Another-Unchanged-Block/Original"); | ||
} | ||
} | ||
} | ||
} |
2 changes: 2 additions & 0 deletions
2
...n/Change-In-Solid-Block-With-Another-Unchanged-Block/New/block0-haschange/0-unchanged.txt
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
This is the first file in block 0. | ||
This file should not change between updates. |
2 changes: 2 additions & 0 deletions
2
...n/Change-In-Solid-Block-With-Another-Unchanged-Block/New/block0-haschange/1-unchanged.txt
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
This is the second file in block 0. | ||
This file should not change between updates. |
3 changes: 3 additions & 0 deletions
3
...ion/Change-In-Solid-Block-With-Another-Unchanged-Block/New/block0-haschange/2-changed.txt
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
This is the third file in block 0. | ||
|
||
This file HAS CHANGED after update. |
4 changes: 4 additions & 0 deletions
4
...ntegration/Change-In-Solid-Block-With-Another-Unchanged-Block/New/block1-unchanged/0.txt2
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
This file represents another block. | ||
|
||
It uses `txt2` extension because Nx groups files by extension by default, | ||
so this makes it easier to test, as files don't have to be grouped manually. |
1 change: 1 addition & 0 deletions
1
...ntegration/Change-In-Solid-Block-With-Another-Unchanged-Block/New/block1-unchanged/1.txt2
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
This is just another file to be included in this block. |
2 changes: 2 additions & 0 deletions
2
...nge-In-Solid-Block-With-Another-Unchanged-Block/Original/block0-haschange/0-unchanged.txt
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
This is the first file in block 0. | ||
This file should not change between updates. |
2 changes: 2 additions & 0 deletions
2
...nge-In-Solid-Block-With-Another-Unchanged-Block/Original/block0-haschange/1-unchanged.txt
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
This is the second file in block 0. | ||
This file should not change between updates. |
3 changes: 3 additions & 0 deletions
3
...hange-In-Solid-Block-With-Another-Unchanged-Block/Original/block0-haschange/2-changed.txt
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
This is the third file in block 0. | ||
|
||
This file WILL CHANGE after update. |
4 changes: 4 additions & 0 deletions
4
...ation/Change-In-Solid-Block-With-Another-Unchanged-Block/Original/block1-unchanged/0.txt2
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
This file represents another block. | ||
|
||
It uses `txt2` extension because Nx groups files by extension by default, | ||
so this makes it easier to test, as files don't have to be grouped manually. |
1 change: 1 addition & 0 deletions
1
...ation/Change-In-Solid-Block-With-Another-Unchanged-Block/Original/block1-unchanged/1.txt2
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
This is just another file to be included in this block. |
2 changes: 2 additions & 0 deletions
2
NexusMods.Archives.Nx.Tests/Assets/Repacks/Unit/Change-In-Solid-Block/New/0-unchanged.txt
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
This is the first file in block 0. | ||
This file should not change between updates. |
2 changes: 2 additions & 0 deletions
2
NexusMods.Archives.Nx.Tests/Assets/Repacks/Unit/Change-In-Solid-Block/New/1-unchanged.txt
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
This is the second file in block 0. | ||
This file should not change between updates. |
3 changes: 3 additions & 0 deletions
3
NexusMods.Archives.Nx.Tests/Assets/Repacks/Unit/Change-In-Solid-Block/New/2-changed.txt
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
This is the third file in block 0. | ||
|
||
This file HAS CHANGED after update. |
Oops, something went wrong.