summaryrefslogtreecommitdiffstats
path: root/debug/test/test_disk_mac
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-15 19:16:34 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-15 19:16:34 +0000
commita398d2c2b5fd6ab0545d8bb019f9a970b2309404 (patch)
tree272fc7ab226258d7ceddee12c8c682c8e711c2b0 /debug/test/test_disk_mac
parentInitial commit. (diff)
downloadparted-a398d2c2b5fd6ab0545d8bb019f9a970b2309404.tar.xz
parted-a398d2c2b5fd6ab0545d8bb019f9a970b2309404.zip
Adding upstream version 3.6.upstream/3.6upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rwxr-xr-xdebug/test/test_disk_mac77
1 files changed, 77 insertions, 0 deletions
diff --git a/debug/test/test_disk_mac b/debug/test/test_disk_mac
new file mode 100755
index 0000000..09b1353
--- /dev/null
+++ b/debug/test/test_disk_mac
@@ -0,0 +1,77 @@
+#! /bin/bash
+
+test_mklabel()
+{
+ ped_test "mklabel" "mklabel mac"
+}
+
+test_mkpart()
+{
+ ped_test "mkpart" "mklabel mac mkpart primary ext2 10 20"
+}
+
+test_mkpartfs()
+{
+ ped_test "mkpartfs" "mklabel mac mkpartfs primary ext2 10 20"
+}
+
+test_rm()
+{
+ ped_test "rm" "mklabel mac mkpart primary ext2 10 20 rm 2"
+}
+
+test_primary_overlap()
+{
+ ped_test "correction of primary partition overlapping"\
+ "mklabel mac \
+ mkpart primary ext2 0.01 100\
+ mkpart primary ext2 50 150"
+}
+
+test_nonexistent_remove()
+{
+ ped_test_expect_fail "removal of non-existent partition"\
+ "mklabel mac \
+ rm 2"
+}
+
+test_create_extended()
+{
+ ped_test_expect_fail "creation of extended partition"\
+ "mklabel mac \
+ mkpart extended 0.01 100"
+}
+
+test_create_small()
+{
+ ped_test "create small partition"\
+ "mklabel mac \
+ mkpartfs primary ext2 1 2"
+}
+
+test_move()
+{
+ ped_test "move partition"\
+ "mklabel mac \
+ mkpartfs primary ext2 1 100 \
+ mkpartfs primary ext2 101 200 \
+ move 2 201 301"
+}
+
+main()
+{
+ if ! test_mklabel; then
+ exit 1
+ fi
+
+ test_mkpart
+ test_mkpartfs
+ test_rm
+ test_primary_overlap
+ test_nonexistent_remove
+ test_create_extended
+ test_create_small
+ test_move
+}
+
+main