mirror of
https://github.com/oh-my-fish/oh-my-fish
synced 2024-11-09 13:10:40 +00:00
27 lines
845 B
Fish
Executable File
27 lines
845 B
Fish
Executable File
#!/usr/bin/env fish
|
|
|
|
function suite_dpaste
|
|
function setup
|
|
__dpaste_set_defaults
|
|
end
|
|
|
|
function test_dpaste_parse_expires
|
|
assert_equal text (__dpaste_parse_expires text)
|
|
assert_equal "https://dpaste.de/api/?format=url" $__dpaste_send_url
|
|
set -g __dpaste_send_url $dpaste_url
|
|
assert_equal text (__dpaste_parse_expires -t never text)
|
|
assert_equal "https://dpaste.de/api/?format=url&expires=never" $__dpaste_send_url
|
|
set -g __dpaste_send_url $dpaste_url
|
|
assert_equal text (__dpaste_parse_expires -t hour text)
|
|
assert_equal "https://dpaste.de/api/?format=url&expires=3600" $__dpaste_send_url
|
|
set -g __dpaste_send_url $dpaste_url
|
|
end
|
|
end
|
|
|
|
if not set -q tank_running
|
|
source (dirname (status -f))/helper.fish
|
|
set -g __dpaste_expires_choises
|
|
source (dirname (status -f))/../dpaste.fish
|
|
tank_run
|
|
end
|