Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changes/pr-559.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
feat: bump sunnyside to 0.2.0 with bu/rs subcommands
6 changes: 3 additions & 3 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions pkgs/rust-packages/sunnyside/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
}:
rustPlatform.buildRustPackage rec {
pname = "sunnyside";
version = "0.1.1";
version = "0.2.0";
src = pkg-src;
cargoHash = "sha256-iKjsrQ/u9SwQZNlSMPjJOxLRSbBuE21Ae0jnJ60fKoE=";
cargoHash = "sha256-aAzaj78FkeY7Q74AaKBhmGAm1b0WAeylBEg3vdwiWYc=";
meta = {
description = "File scrambler.";
longDescription = ''
Expand Down
15 changes: 15 additions & 0 deletions test/test_sunnyside.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,20 @@ if [[ "$ccontent" != "SUCCESS" ]]; then
exit 1
fi

make-title -c yellow "Testing sunnyside bu/rs (file)"
echo "BACKUP_TEST" > original.txt
sunnyside bu -t original.txt -s 4 -k u -d backup.tyz
[[ -f backup.tyz ]] || { echo_red "bu: dest not created"; exit 1; }
sunnyside rs -t backup.tyz -s 4 -k u -d restored.txt
[[ "$(cat restored.txt)" == "BACKUP_TEST" ]] || { echo_red "rs: file content mismatch"; exit 1; }

make-title -c yellow "Testing sunnyside bu/rs (directory)"
mkdir -p testdir/sub
echo "NESTED" > testdir/sub/file.txt
sunnyside bu -t testdir -s 4 -k u -d dir_backup.tyz
[[ -f dir_backup.tyz ]] || { echo_red "bu: dir dest not created"; exit 1; }
sunnyside rs -t dir_backup.tyz -s 4 -k u -d testdir_restored
[[ "$(cat testdir_restored/sub/file.txt)" == "NESTED" ]] || { echo_red "rs: dir content mismatch"; exit 1; }

# Cleanup
rm -rf "$tmpdir"
Loading