Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
O
oh-my-fish
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nanahira
oh-my-fish
Commits
b8252160
Commit
b8252160
authored
Jan 20, 2015
by
Bruno Pinto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
removing flaky bak tests
parent
6834ae75
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
113 deletions
+0
-113
plugins/bak/spec/bak.spec.fish
plugins/bak/spec/bak.spec.fish
+0
-113
No files found.
plugins/bak/spec/bak.spec.fish
deleted
100644 → 0
View file @
6834ae75
import plugins/bak
import plugins/fish-spec
function describe_bak_plugin
function before_all
set -g test_dir /tmp/bak_test
mkdir -p $test_dir
pushd
cd $test_dir
rm -rf $test_dir/*
end
function after_each
rm -rf $test_dir/*
end
function after_all
popd
end
function it_checks_if_bak_filename_pattern_is_followed
expect __is_bak '.ccnet.20140817_234302.bak' --to-be-true
expect __is_bak 'file\ with\ spaces.20140817_234302.bak' --to-be-true
expect __is_bak '.ccnet.bak' --to-be-false
end
function it_normalizes_the_file_name
expect (__bak_normalized '.ccnet.20140817_234302.bak') --to-equal '.ccnet'
expect (__bak_normalized 'file with spaces.20140817_234302.bak') --to-equal 'file with spaces'
end
function it_moves_a_single_file
touch a
mvbak a
expect __is_bak (ls) --to-be-true
end
function it_moves_multiple_files
touch a b
mvbak a b
for f in (ls)
expect __is_bak $f --to-be-true
end
end
function it_undo_moves_of_a_single_file
touch a
mvbak a
unmvbak (ls)
expect (ls) --to-equal a
end
function it_undo_moves_of_multiple_files
set files (seq 4)
touch $files
mvbak $files
unmvbak (ls)
expect (ls) --to-equal "$files"
end
function it_copies_a_single_file
touch a
cpbak a
expect (ls -p) --to-contain-all (echo 'a'\n(__bak_name a))
end
function it_copies_multiple_files
set files (seq 4)
touch $files
cpbak $files
for f in $files
set files_bak $files_bak (__bak_name $f)
end
expect (ls) --to-contain-all $files $file_bak
end
function it_undo_copies_of_a_single_file
touch a
cpbak a
set -l bak_filename (__bak_name a)
rm a
uncpbak (ls)
expect (ls) --to-contain-all (echo 'a'\n$bak_filename)
end
function it_undo_copies_of_multiple_files
set files (seq 4)
touch $files
mvbak $files
unmvbak (ls)
expect (ls) --to-equal "$files"
end
function it_undo_copies_of_a_directory
mkdir a
cpbak a/
rmdir a
uncpbak (ls -p)
expect (ls -p) --to-contain-all (echo 'a/'\n(__bak_name a)'/')
end
end
spec.run $argv
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment