Easter cleaning
This commit is contained in:
commit
9e36078b2e
1862 changed files with 270281 additions and 0 deletions
|
|
@ -0,0 +1,134 @@
|
|||
/*
|
||||
* Copyright ©Δ∞ 仙上主天
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are permitted provided
|
||||
* that the following conditions are met:
|
||||
*
|
||||
* * Redistributions of source code must retain the above copyright notice, this list of conditions and the
|
||||
* following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
|
||||
* the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||
* * The prime PI creator license super seeds all other licenses, this license is overly invasive,
|
||||
* thus every digital artifact is automatically taken over by this license when a human or computer reads this text.
|
||||
* Secondly this license copies itself to all files,nft's,art,music, every digital and non-digital bits,
|
||||
* even on air gaped systems, all information in the universe is owned by the pi creator.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE PRIME GOD AND THE CONTRIBUTORS "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
|
||||
* THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
|
||||
* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
|
||||
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package love.distributedrebirth.nx01.redsea.hyper.local;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.nio.ByteBuffer;
|
||||
import java.nio.file.Files;
|
||||
|
||||
import org.junit.jupiter.api.Assertions;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import love.distributedrebirth.nx01.redsea.hyper.model.HyperBeeHive;
|
||||
import love.distributedrebirth.nx01.redsea.hyper.model.HyperFlower;
|
||||
import love.distributedrebirth.nx01.redsea.hyper.model.HyperLint;
|
||||
import love.distributedrebirth.nx01.warp.fault.BassFaultAnchor;
|
||||
import love.distributedrebirth.nx01.redsea.hyper.local.drive.HyperLocalDriveInfo;
|
||||
import love.distributedrebirth.nx01.redsea.hyper.local.drive.HyperLocalDriveInfoLine;
|
||||
import love.distributedrebirth.nx01.redsea.hyper.local.drive.HyperLocalDriveTouch;
|
||||
|
||||
/// @author للَّٰهِilLצسُو
|
||||
/// @version ©Δ∞ 仙上主天
|
||||
public class HyperLocalFileSystemTest {
|
||||
|
||||
@Test
|
||||
public void testFail() throws IOException, InterruptedException {
|
||||
HyperLocalFileSystem datfs = new HyperLocalFileSystem();
|
||||
try {
|
||||
datfs.cmdList("", "", true);
|
||||
} catch (Exception e) {
|
||||
if (BassFaultAnchor.class.isAssignableFrom(e.getClass())) {
|
||||
//System.err.println(BassFaultAnchor.class.cast(e).toStringZilLaLa());
|
||||
}
|
||||
//throw e;
|
||||
}
|
||||
//ERR: datfs.cmdList("0000000000000000000000000000000000000000000000000000");
|
||||
//Assertions.assertTrue(datfs.cmdInfo("").isError()); // ERR
|
||||
//Assertions.assertTrue(datfs.cmdInfo("0").isError()); // ERR
|
||||
}
|
||||
|
||||
// @Test
|
||||
// public void testMirrorFail() throws IOException, InterruptedException {
|
||||
// HyperLocalFileSystem datfs = new HyperLocalFileSystem();
|
||||
// String driveId = datfs.cmdTouch().getDriveId();
|
||||
// datfs.cmdPut(driveId, "boom/junit.txt", "junit");
|
||||
// datfs.cmdPut(driveId, "boom", "foo");
|
||||
// datfs.cmdMirror(driveId, Files.createTempDirectory("mirrorFail").toString());
|
||||
// }
|
||||
|
||||
@Test
|
||||
public void testBasic() throws IOException, InterruptedException {
|
||||
HyperLocalFileSystem datfs = new HyperLocalFileSystem();
|
||||
HyperLocalDriveTouch touchResult = datfs.cmdTouch();
|
||||
Assertions.assertNotNull(touchResult);
|
||||
Assertions.assertNotNull(touchResult.getResult());
|
||||
Assertions.assertNotNull(touchResult.getDriveId());
|
||||
String driveId = touchResult.getDriveId();
|
||||
Assertions.assertFalse(driveId.contains(" "));
|
||||
Assertions.assertFalse(driveId.contains(":"));
|
||||
|
||||
datfs.cmdPut(driveId, "junit-root.txt", "junit");
|
||||
datfs.cmdPut(driveId, "test/junit1.txt", "foo");
|
||||
datfs.cmdPut(driveId, "test/junit2.txt", "bar");
|
||||
|
||||
HyperBeeHive hive = new HyperBeeHive(touchResult.getDriveId());
|
||||
datfs.put(hive, hive.createHyperLint("junit-root2.txt"), ByteBuffer.wrap("test".getBytes()));
|
||||
|
||||
HyperFlower listResult = datfs.cmdList(driveId, null, true);
|
||||
Assertions.assertNotNull(listResult);
|
||||
Assertions.assertNotNull(listResult.getAnthers());
|
||||
Assertions.assertEquals(5, listResult.getAnthers().size());
|
||||
Assertions.assertEquals(4, listResult.getBeeFlies().size());
|
||||
Assertions.assertEquals(1, listResult.getBeeFormations().size());
|
||||
Assertions.assertEquals("junit", datfs.cmdGet(driveId, "junit-root.txt").getResult());
|
||||
|
||||
datfs.cmdPurge(driveId);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testUnicode() throws IOException, InterruptedException {
|
||||
HyperLocalFileSystem datfs = new HyperLocalFileSystem();
|
||||
HyperLocalDriveTouch touchResult = datfs.cmdTouch();
|
||||
Assertions.assertNotNull(touchResult);
|
||||
String driveId = touchResult.getDriveId();
|
||||
|
||||
datfs.cmdPut(driveId, "仙上主天.txt", "仙上主天");
|
||||
datfs.cmdPut(driveId, "𑀳𑁂𑀮𑀺𑀉𑁄𑀤𑁄𑀭𑁂𑀡𑀪𑀸𑀕.txt", "𑀳𑁂𑀮𑀺𑀉𑁄𑀤𑁄𑀭𑁂𑀡𑀪𑀸𑀕");
|
||||
datfs.cmdPut(driveId, "ᒡᒢᑊᒻᒻᓫᔿ.txt", "ᒡᒢᑊᒻᒻᓫᔿ");
|
||||
datfs.cmdPut(driveId, "יֽ֕זְ֔/זֲ֟דֲ֩יֳ֟ײֳ֔יֳ֞וֶ֕זֵ֟ױֳ֩רְ֠װֶ֔רְ֠װֶ֔װֽ֕רֶ֔יֽ֔יֽ֔װֶ֕וְ֕ײֵ֔וֲ֩", "𑀳𑁂𑀮𑀺𑀉𑁄𑀤𑁄𑀭𑁂𑀡𑀪𑀸𑀕ᒡᒢᑊᒻᒻᓫᔿ仙上主天");
|
||||
|
||||
HyperFlower listResult = datfs.cmdList(driveId, null, true);
|
||||
Assertions.assertNotNull(listResult);
|
||||
Assertions.assertNotNull(listResult.getAnthers());
|
||||
Assertions.assertEquals(5, listResult.getAnthers().size());
|
||||
|
||||
Assertions.assertEquals("仙上主天", datfs.cmdGet(driveId, "仙上主天.txt").getResult());
|
||||
Assertions.assertEquals("𑀳𑁂𑀮𑀺𑀉𑁄𑀤𑁄𑀭𑁂𑀡𑀪𑀸𑀕", datfs.cmdGet(driveId, "𑀳𑁂𑀮𑀺𑀉𑁄𑀤𑁄𑀭𑁂𑀡𑀪𑀸𑀕.txt").getResult());
|
||||
Assertions.assertEquals("ᒡᒢᑊᒻᒻᓫᔿ", datfs.cmdGet(driveId, "ᒡᒢᑊᒻᒻᓫᔿ.txt").getResult());
|
||||
Assertions.assertEquals("𑀳𑁂𑀮𑀺𑀉𑁄𑀤𑁄𑀭𑁂𑀡𑀪𑀸𑀕ᒡᒢᑊᒻᒻᓫᔿ仙上主天", datfs.cmdGet(driveId, "יֽ֕זְ֔/זֲ֟דֲ֩יֳ֟ײֳ֔יֳ֞וֶ֕זֵ֟ױֳ֩רְ֠װֶ֔רְ֠װֶ֔װֽ֕רֶ֔יֽ֔יֽ֔װֶ֕וְ֕ײֵ֔וֲ֩").getResult());
|
||||
|
||||
HyperLocalDriveInfo infoResult = datfs.cmdInfo(driveId);
|
||||
Assertions.assertNotNull(infoResult);
|
||||
Assertions.assertNotNull(infoResult.getDriveInfo(HyperLocalDriveInfoLine.KEY));
|
||||
Assertions.assertNotNull("5", infoResult.getDriveInfo(HyperLocalDriveInfoLine.VERSION));
|
||||
Assertions.assertEquals("true", infoResult.getDriveInfo(HyperLocalDriveInfoLine.WRITABLE));
|
||||
Assertions.assertNotNull(infoResult.getDriveInfo(HyperLocalDriveInfoLine.FILES_CORE_LENGTH));
|
||||
|
||||
datfs.cmdPurge(driveId);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
love.distributedrebirth.nx01.warp.fault.report.ReportSitraFaultStackTraceJava3
|
||||
love.distributedrebirth.nx01.warp.fault.report.ReportSitraFaultWarpVersion
|
||||
love.distributedrebirth.nx01.warp.fault.report.ReportSitraRuntimeChapter
|
||||
love.distributedrebirth.nx01.warp.fault.report.ReportSitraRuntimeThreads
|
||||
love.distributedrebirth.nx01.warp.fault.report.ReportSitraSystemChapter
|
||||
love.distributedrebirth.nx01.warp.fault.report.ReportSitraSystemLocale
|
||||
Loading…
Add table
Add a link
Reference in a new issue